I've defined a pointer to array of 4 ints.
Now, dereferencing that pointer still causes it to display the address it points to instead of the value that it points at.
Dereferencing it second time causes the value to be displayed, but I have no idea why is that so. Here's the code :
1 2 3 4 5
int arr[] = {1,4,6,8};
int (*pint3)[4] = &arr;
std::cout << (pint3) << "\n"; //prints the address of 0 element of arr
std::cout << (*pint3) << "\n"; //still prints the address of 0 element of arr - why ?
std::cout << (**pint3) << "\n"; //now prints the value of the 0 element of arr - why is the double dereference needed ?