Hi,
I have some difficulties grasping some concepts. Grateful for help.
Let's say you have the following piece of code:
int *intPtr; // creates a pointer
int count = 10; // initiates an intiger variable
intptr = &count; // ??
The & operator gives the address to a variable, in this case the integer count. The address is then assigned to the intptr. My question is: Why is intptr = count; not sufficient. I know that count is a variable and intptr is a pointer, but isn´t a variable also just referring to some place in memory?
Hans