In an array the name of the array is a pointer to the array. So in iArray and & iArray [0] the same value is obtained. What I do not understand very well, is what is happening when I try to repeat this with myvector. int iArray [] = {1,2,3,4}; cout << ... [0] << endl; Print me different addresses. Working with vectors, is there any way to know where element 0 is, by the name of the vector?
asked
Aug 17, 2020
game
4.6k points