Hello,
So, I didnt know I could do this:
So then this means that when you use the subscript operator ( [ ] <- I believe subscript op is what it's called...correct me if I'm wrong), so when you use that operator, the function body automatically dereferences the pointer (in this case pArray)?...so now curiously how would the declaration of an array factor into the use of the [] operator? I mean is it a matter of operator overloading? Just something I was thinking about...if you know of any good text to read on the matter that'll work, dont feel likeyou haveta answer this question yourself..I just like to know the inner workings of whats going on, makes the visualization easier in some cases. ChapCode:int main() { const int ARRAYSIZE = 10; int myArray[ARRAYSIZE]; for (int i = 0; i < ARRAYSIZE; i++) myArray[i] = i+5; cout << myArray << endl; int* pArray = myArray; cout << pArray[0] << endl; return 0; }