C++写入txt
在C++中對文件進行操作,要包含頭文件
#include <fstream> using namespace std;創(chuàng)建對象(簡單舉例):
ofstream outfile; outfile.open("data.txt")寫入內(nèi)容
outfile<<要寫入的內(nèi)容<<"\n";關(guān)閉文件,保存文件。
outfile.close()
轉(zhuǎn)載于:https://www.cnblogs.com/lzq116/p/10899839.html
與50位技術(shù)專家面對面20年技術(shù)見證,附贈技術(shù)全景圖總結(jié)
- 上一篇: Selenium Grid Node 安
- 下一篇: win7旗舰版怎么改xp win7旗舰版