What is a pointer notation?

Write your question here.
I am wondering what a pointer notation is in C++. Can someone provide me an example and explain to me what is it and what does it do? Thank you very much.
Last edited on
closed account (SECMoG1T)

1
2
3
4
5
6
7
int *ptr; ///pointer , these ppointer can only store an address to a variable of type int
 int foo=10;

 ptr=&foo; /// assigning a the address of our variable foo;
cout<<*ptr <<endl; /// dereferencing ptr the out put is 10
cout <<foo <<endl; /// similar to the example above output is 10


check these here
http://www.cplusplus.com/doc/tutorial/pointers/
Last edited on
Topic archived. No new replies allowed.