programming-examples/c++/Others/Creates a file using fstream.cpp
2019-11-15 12:59:38 +01:00

14 lines
258 B
C++

Creates a file using fstream
//this example creates a file called myfile.txt
//and adds some text message to it
#include <fstream.h>
int main()
{
ofstream MyFile("myfile.txt");
MyFile<<"This is some test message";
MyFile.close();
return 0;
}