Original Post
Yes, I know this is a very basic question, but I wanted to know more for clarification, since I see things done two ways.
If you do this:
int bob;
int *x; // x is a pointer to an integer
x = &bob // x points to address of bob
Is that the same as this:
int bob;
int *x = &bob / x points to address of bob
Or do those mean two different things?
And if you do this:
int tom;
int *x = &tom
Would *x hold the address of tom, and x hold the value of tom? Is that correct? And would changing x to 27 make tom 27, or changing tom to 100, make x 100? Any clarification on these things would be helpful.
While programming in C, what do the -> operators mean? I don''t really know what they are called, so I can''t look up information on them.
Thanks all.
I am not worthy of a sig!