0

Whats the difference between using << and >> in C++?

I don't get why cout uses << while cin uses >>

16th Jan 2018, 12:03 PM
Bryan Miu
Bryan Miu - avatar
3 Réponses
+ 1
It's just how they are defined, outputstream uses<< input stream uses>>
16th Jan 2018, 12:08 PM
Marco
Marco - avatar
0
so anything that has something like c"OUT" uses << and anything that has c"IN" uses >>?
17th Jan 2018, 10:09 AM
Bryan Miu
Bryan Miu - avatar
0
Yes, for example ofstream and ifstream (used for files)
17th Jan 2018, 10:49 AM
Marco
Marco - avatar