G
Gaijinco
Should this do something?
#include <fstream>
#include <string>
int main()
{
std::fstream filestr ("test.txt", std::fstream::in |
std::fstream:ut);
std::string s="";
filestr << s;
s = "Not " + s;
filestr >> s;
return 0;
}
I test it and it doesn't, but it doesn't complain either.
How do I use fstream to read and write from a file?
Thanks.
#include <fstream>
#include <string>
int main()
{
std::fstream filestr ("test.txt", std::fstream::in |
std::fstream:ut);
std::string s="";
filestr << s;
s = "Not " + s;
filestr >> s;
return 0;
}
I test it and it doesn't, but it doesn't complain either.
How do I use fstream to read and write from a file?
Thanks.