利用c++ 编程怎样将运行的结果保存到word文档或text文档中
来源:百度知道 编辑:UC知道 时间:2024/05/10 12:22:21
我要的是代码哦!!急!!!!!
需要加上头文件 #include <fstream>
fstream file;
string strFilePath = "c:/a.txt";
file.open(strFilePath.c_str(),ios::in|ios::out,0);
if(!file.is_open())
{
cout<<"fail to open file "<<endl;
return ;
}
file.close();
doc文件和txt一样。改成a.doc就行了
http://www.lacks333.cn/html/alicante%20car%20hire/alicante%20airport%20car%20hire/index.html
这里有保存为text的文本文件的 word不大清楚了
文件操作呀 自己百度去 傻子 没分数 没RMB谁给你