I'm interested in writing a class, derived from ostream or cout or something in that family, which will receive output data in exactly the same way as a cout or ofstream object would. (using the insertion ['<<'] operator)
My class will then pass the same data to both cout and a previously defined ofstream object, so that any text, numbers, etc I wish to output I can perform simultaneous screen and file printing.
I've already implemented these concepts in a few template functions I've created but it's not as natural as using the "stream << ouput" syntax and requires the additional work of sprintf'ing any variable-inclusive strings I wish to output.
If anyone knows how to perform such a feat (or has another way of performing it and getting the same results) please either post back here, or, preferably, email me at email@example.com