c++ write file
This commit is contained in:
parent
78d372d7e7
commit
53b2658a81
10
code/C++/write_to_file.cpp
Normal file
10
code/C++/write_to_file.cpp
Normal file
@ -0,0 +1,10 @@
|
||||
#include <fstream>
|
||||
using namespace std;
|
||||
|
||||
int main() {
|
||||
ofstream myfile;
|
||||
myfile.open("example.txt", ios::in | ios::app);
|
||||
myfile << "Сообщение\n";
|
||||
myfile.close();
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user