Hi, I'm a bit confused on this pointer question, can anyone shed some light on this?
Please and thank you
Code:int main() { int x = 10; int *p; p = &x; cout << p << endl; //should get address of x cout << &x << endl; //address of x cout << *(&x) << endl; //10 cout << &p << endl; //<--- this is the address of p cout << *(&p) << endl; //address of x , but why is this the address of x?? system("PAUSE"); return 0; }