c++写一个将字符写入txt的语句
#include
int main() { ofstream fout("example.txt"); if (!fout) { cout << "Error: cannot open file!" << endl; return 1; } fout << "Hello world!" << endl; fout.close(); return 0; }
原文地址: https://www.cveoy.top/t/topic/dvL1 著作权归作者所有。请勿转载和采集!