I have a pointer problem which I don't understand, I hope you can help me.
int main()
{
int tab[] = {1,2,3};
int *ptr;
ptr=tab; // this is where my doubt lies
cout << &ptr << "," << ptr << "," << *ptr << "," << &tab << "," << tab << "," << *tab << endl;
return(0);
}
to put the pointer pointing to what you want shouldn't you do, for example ptr=&something ?? If someone could explain it to me I appreciated. Thanks