I come from a C# and Java background into C++ and I\'m trying to get to understand the >>
& <<
operators such as in
std
In C and C++ the << operator means "shift left". In C++, when using the standard template library, the << and >> operators are overloaded to implement a streaming API.
The object std::cout does overload the << operator to use it as a conversion function (in this case to a string printed to the console).
Actually this:
int x = myFunction();
std::cout << x;
and this:
std::cout << myFunction();
are functionally the same (besides the definition of the temporary variable x).