I need to code a class that behaves as a cout (or is used instead of a cout). The class is constructed by getting a reference to a cout - so it would be
ClassName nam(&cout);
and then to output a string or something
nam << "output"; //prints 'output'
there are more stuff to do but I can figure that out, its just that I never programmed something similar and I cant find an example of what I am looking for...