P
peter.xiau
In my case, I'd to open several output files at one time, but the
number of output files are determined at run-time, not compile-time.
So I tried to open file with std:fstream when I need, and push the
std:fstream object to a vector std::vector<std:fstream>.
But I faced one problem that, the std:fstream doesn't support a
asignment operator, so vector.push_back (ostream) cause an compile-time
error.
Does there are other ways that I can manange multiple files at
run-time?
Thanks a lot
number of output files are determined at run-time, not compile-time.
So I tried to open file with std:fstream when I need, and push the
std:fstream object to a vector std::vector<std:fstream>.
But I faced one problem that, the std:fstream doesn't support a
asignment operator, so vector.push_back (ostream) cause an compile-time
error.
Does there are other ways that I can manange multiple files at
run-time?
Thanks a lot