operator<<
overload for char*
expects a pointer to a null terminated array of characters so that it knows where the string ends. It just so happens that your char
variables were allocated contiguously in memory and that a 0 byte follows them. The code invokes undefined behaviour though.
To print a single char, dereference the pointer:
cout << *myMap['a'] << endl;