for the second option, if the thing I want to output is not a single type stuff(I mean: there will be strings, numbers ...), should I put them all in a stringstream first? and then do
write(cout, ofs, stringstream & ss);
???
What do you mean by wrap?
like
1 2 3 4 5 6 7
class output {
public:
istream is;
ifstream ifs;
???
};
How to define this kind of class and how to use it? THanks.