Hello i would like to find out how its doing. I have code like that:
int tab[] = {1,2,3};
int* p;
p = tab;
cout <<p<<endl; // cout adress here
cout <<p[0]<<endl; // cout first element of the array
How its doing that p is storing address of first element but p[0] is already storing first element?
its working like p[0] = *p ? and p[1] is working like p[1] = *(p+1)?
I know how to use it but I'm little confused because i don't really understand it