Well, in general, the goal is such that in the function it is possible to transfer either the object of my class, or cout | cin.
MyStream mout = MyStream();
MyStream min = MyStream();
...
static int UShowTFileList(ostream& out, istream& in);
...
UShowTFileList(cout, cin);
UShowTFileList(mout,min);
The obvious solution does not work. There are no constructors.
class MyStream : public ostream, public istream {...}
...
MyStream mout = MyStream();
MyStream min = MyStream();
...
-->
Error (active) E1790 the default constructor of "MyStream" cannot be referenced -- it is a deleted function
Well, all the challenges, too.
mout << "Hello, world!" << "\n";
->
Error C2280 'MyStream::MyStream(const MyStream &)': attempting to reference a deleted function
In general, how correctly to inherit istream, ostream? MyStream.h