Both myints and hello are arrays, and so as I understand it, their names should be pointers to the first element of an array, so I was expecting to get nonsence in both cases. Is this just my implementation being 'nice' towards hello here, or is this standard behaviour? I read that hello should be synonymous with the string literal "Hello", but this doesn't make sense if it is an array.
hello is a char*. When you do cout << char*, a null terminated string to which hello points is printed. myints is an int*. When you do cout << with any pointer which is not char*, the address of that pointer is printed in hexadecimal.
When you write cout << "Hello", compiler sees it as cout << a_pointer_to_a_null_terminated_const_string_that_says_Hello, so it really is the same thing. The use of string literals in a line such as char hello = "Hello" is an entirely unrelated case.
I think I see now: so passing a pointer_to_a_null_terminated_array_containing_chars to cout << is is treated in a special way compared to passing other pointers.
When you say
The use of string literals in a line such as char hello = "Hello" is an entirely unrelated case.
I'm a little confused, because my book (Accelerated C++) says that my hello has exactly the same meaning as the string literal "Hello", except, of course that they are different objects in the computer's memory.