SyntaxFix
Write A Post
Hire A Developer
Questions
There should be no \0 in text files.
\0
#include<iostream> #include<fstream> using namespace std; int main(){ fstream f(FILENAME, fstream::in ); string s; getline( f, s, '\0'); cout << s << endl; f.close(); }