This is because the <<
operator has been overloaded to handle the case of a char*
and print it out as a string. As opposed to the address (which is the case with other pointers).
I think it's safe to say that this is done for convenience - to make it easy to print out strings.
So if you want to print out the address, you should cast the pointer to a void*
.