12345
ofstream F; F.open ("filename.txt", fstream::ape); // <---- here is the difference // file output operations F.close();