用c++写入文件(代码实例)
头文件:#include<fstream>
/*打开配置文件*/
ofstream out("input.txt");
if(!out.is_open()){
#if debug
cout<<"打开配置文件失败(写入):"<<endl;
#endif
return -2;
}
/*写入配置文件*/
out <<"写入文件的数据";
out.close();
多遗憾我错过你