does this create a vector of pointers or a pointer to a vector?
No. The statement int index; creates a variable named index. While this variable is associated with a chunk of memory, this declaration statement does not allocate memory, at least not in the sense you are thinking. I certainly hope you will not write code that accesses the value of the variable index before you assign it a value.OK. So it actually allocates the memory for the pointer and also allocates the memory for the vector that is pointed to, right?
his declaration statement associates a variable with a chunk of memory. It does not, however, allocate memory, at least not in the sense you appear to be thinking.