Text file

Ok so can sombudy show me how to make a text file with a program?
1
2
3
4
5
6
#include <fstream>
int main()
{
  std::ofstream os("file.txt");
  os << "a text file\n";
}


http://www.cplusplus.com/doc/tutorial/files/
Topic archived. No new replies allowed.