I can overload the return value for example on cout
function?
I have for example this class :
class Xxx
{
string val = "3";
}
Now I would like to return "3"
on cout
without other method.
I want that :
Xxx myVar;
cout<<myVar;
prints "3"
as its result.