You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
258 B
C++
14 lines
258 B
C++
5 years ago
|
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;
|
||
|
}
|