I would like to create a class similar to std::cout. I know how to overload the >> and << operators, but I would like to overload the << operator so it would be input, just like in std::cout.
it should be somthing like:
class MyClass
{
std::string mybuff;
public:
//friend std::???? operator<<(????????, MyClass& myclass)
{
}
}
.
.
.
MyClass class;
class << "this should be stored in my class" << "concatenated with this" << 2 << "(too)";
Thanks