0
I can not understand pointer in c++
can you help me?
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