Should
andCode:ofstream s(name.c_str());
give the same results?Code:ifstream s(name.c_str(), ios_base::out);
Should
andCode:ofstream s(name.c_str());
give the same results?Code:ifstream s(name.c_str(), ios_base::out);
did you mean
in the second line code?Code:fstream s(name.c_str(), ios_base::out);
All problems in computer science can be solved by another level of indirection,
except for the problem of too many layers of indirection.
– David J. Wheeler