Here is just a test prototype :
#include #include using namespace std; int main() { int a=10; char b=\'H\'; string
The << operator in your code is overloaded in C++ 11. It doesn't conflict with any of other types like int or string, but it takes pointer to char which if used can produce undesired results.
<<
int
string
char
You can do it like:-
cout << static_cast(&b)