C++ equivalent of java.toString?
<p>I'd like to control what is written to a stream, i.e. cout, for an object of a custom class. Is that possible in C++? In Java you could overwride the toString() method for similar purpose. Thanks</p>
