ok so i kinda still dont understand pointers, but i am going to show u why i dont get it. in the tutorial they give you this code:
Code:
#include <iostream.h>
int main()
{
int x; //A normal integer
int *pointer; //A pointer to an integer
pointer=&x; //Read it, "pointer equals the address of x"
cin>>x; //Reads in x
cout<<*pointer; //Note the use of the * to output the actual number stored in x
}
ok so you see i understand how all this codes works, but the things i still dont get is, well if you look at this it looks like the pointer is only being you to display the value of x in another way, couldnt this just be done easily with out the extra code just by doing: