Pointer confusion
Posted: Mon Jan 07, 2008 9:36 pm
I know, i should have got the hang of this a long long time ago
anyway, i have come up with these three pointer rules:
"*ptr" to retrive the data pointed too or to declare a pointer.
"&ptr" to retrive the memory address of a pointer.
"ptr" to retrieve the memory address pointed too by a pointer.
Now i just want to be sure that i'm not missing anything or am making the wrong assumptions.
anyway, i have come up with these three pointer rules:
"*ptr" to retrive the data pointed too or to declare a pointer.
"&ptr" to retrive the memory address of a pointer.
"ptr" to retrieve the memory address pointed too by a pointer.
Now i just want to be sure that i'm not missing anything or am making the wrong assumptions.