+ 5
Pointer and reference to it???
I have the following code: int *ptr = new int; *ptr = 5; cout << ptr << endl << *ptr << endl << &ptr << endl; Output: 0x26A9D8 //it address to variable 5 //it variable's value 0x14FA10 //but what is it? Address of *ptr?
3 ответов
+ 8
You should look this page, here they explain what & and * means in C++ : http://www.cplusplus.com/doc/tutorial/pointers/
Hope it helps 😉