+ 2

What does the 'cout' operator do?

When the cout operator has to output something, does it convert it to a string? Or how does it work?

25th Nov 2016, 2:36 PM
‎ɐısıօլɐ
‎ɐısıօլɐ - avatar
2 ответов
+ 1
cout has overloaded operator "<<" which supports almost all basic types. If you want to make a string from different types, you can use stringstreams
25th Nov 2016, 3:00 PM
A A
+ 1
I'm asking because I have the task to code an own vectorclass and the print method I created doesn't work, it outputs weird symbols
28th Nov 2016, 12:39 PM
‎ɐısıօլɐ
‎ɐısıօլɐ - avatar