+ 1
It's about pointer
How does the pointer store data and how to locate data?
4 Réponses
+ 3
please use the search bar, this question have been asked several times in the past, and nice answers have been given to it
+ 2
Pointer stores the location in memory of the data it points to. "Referencing" the data with the * operator lets you get the info it points to. To store the data, you "dereference" it with the & operator.
At least I think thats the terminology.
+ 2
A pointer usually stores the address of another variable.
+ 2
Jackson O’Donnell Dereferencing not referencing a pointer is getting its value ;)
int x = 5;
int* p = &x; //& before variable gets its address
std::cout << *p; // dereferencing - cout shows "5"