0

I can not understand pointer in c++

can you help me?

27th Feb 2017, 7:22 AM
Moh_ Saber
Moh_ Saber - avatar
1 Resposta
+ 1
You should remember that pointer points address of memory which is reserved for variable. Try excercise operators & and * . int var; int *p; //declare pointer p of type int p = &var // now pointer points to address of variable var cout << p ; //it shows address of memory where is var cout << *p; // now it shows value of variable var
27th Feb 2017, 11:01 AM
Anna