Why should the compiler warn you about something that is perfectly legal? You are instructing the program to output the content of cout
, which is legal, and will work.
I am not sure how the operator <<
is defined for cout
, but printing its address would be my expectation, so something like 0x489944
(or longer) seems just right.
With the 5 and the 6 around it, your output seems correct: 5
+0x489944
+6
= 50x4899446
4
solved No error/warning for multiple cout in one statement