What is the << operator for in C++?

后端 未结 6 1275
抹茶落季
抹茶落季 2021-01-21 13:21

I come from a C# and Java background into C++ and I\'m trying to get to understand the >> & << operators such as in

std         


        
6条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-21 14:07

    As far as I remember, c++ has streams
    << is an operator that is an operator that is used to "append data" to a stream
    And >> is used to extract data from a stream.
    Of course, you can implement this with classes which are not just streams.

提交回复
热议问题