#include <iostream> #include <fstream> using namespace std; int main(){ ofstream outfile; outfile.open("test.txt"); outfile<<"haha ,my first test txt!"; outfile.close(); return 0; }