"<<"'s meaning in C++ is never "write to standard output". That is the output streams overloading the operator for their own operations. Similarly, you can write operator<< for your classes to mean whatever. The original meaning of "<<" has always been left shift.