What is the use of this << and >> in c++ | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

What is the use of this << and >> in c++

C++

20th Dec 2021, 11:34 AM
Yasir Hakimi400P
Yasir Hakimi400P - avatar
2 Answers
+ 1
They are used for insertion and extraction in iostream objects; << for oestream (output): cout << endl; >> for istream (input): cin >> var; Also can overload them for custom behavior.
20th Dec 2021, 7:55 PM
Kiwwi#
Kiwwi# - avatar