Refering to https://stackoverflow.com/a/22250138/5783540 it says:
when you have
int a = 10;
and you do
&a
it turns out it is: int*
But why a pointer? I know &a
will give you a memory address but it doesn't hold an address but a number 10
or am I wrong?
Please read:
I know what a pointer is, I know what &
actually does. I'm just confused with:
To get the address of a, you do: &a (address of a) which returns an int* (pointer to int)
Again, why should int a
be a pointer?
Edit: Thanks guys. I was reading wrong. There is no hidden magic behind pointers. Just my bad reading...