+ 1

Why should we put inserters in cout

Why can't we use this: cout<<"Hello World"; instead of: cout<<"Hello"<<"World; What is the difference?

17th Aug 2016, 4:01 PM
Maksym Malishchuk
Maksym Malishchuk - avatar
3 Respuestas
+ 1
Output will differ: Hello World vs HelloWorld Easy readability is just one viewpoint, it has a bigger chance to make mistakes doing it the second way.
18th Aug 2016, 6:11 AM
Tamas Szekffy
Tamas Szekffy - avatar
0
You can by all means do that. The difference is that the former is more efficient and readable.
17th Aug 2016, 4:57 PM
Ahkrin
0
It the console output operater
4th Sep 2016, 8:24 PM
wess