Oct
29
Write To A Text File
ByThis snippet will write a text file.
#include <fstream.h> int main() { ofstream outfile("example.txt"); if (outfile.is_open()) { outfile << "This is a line.\n"; outfile << "This is another line.\n"; outfile.close(); } return 0; }
Leave a Comment
You must be logged in to post a comment.