SyntaxFix
Write A Post
Hire A Developer
Questions
You need to add some arguments. Also, instancing and opening can be put in one line:
fstream file("test.txt", fstream::in | fstream::out | fstream::trunc);