Say datais a direct pointer to the memory array used by a vector.
What then, does &data[index] mean?
I'm guessing data[index] is a pointer to the particular element of the array at position index, but then is &data[index]the address of that pointer?
datapoints at the "memory array used by a vector", it points at the first element of that vector.data[index]is then (a reference to NOT a pointer to) theindexth element of the vector with zero-based indexing (e.g. ifindexis0thendata[index]is the first element of the vector, ifindexis9thendata[index]is the tenth element of the vector). The preceding assumes the vector has ten or more elements - if that assumption is untrue, then evaluating the expressiondata[index]gives undefined behaviour.&data[index]is the address ofdata[index]. - Peterdata[index]is the element at positionindex, not a pointer to it.&data[index]is the pointer. - john