如何用C++建立文本文件
来源:百度知道 编辑:UC知道 时间:2024/05/22 19:16:15
例如:要包含头文件#include <fstream>
ofstream outfile2("变换后.txt");
if ( ! outfile2 )
{
cerr << "error: unable to open output file!\n";
return -2;
}
outfile2<<N<<endl;
outfile2<<diameter<<endl;
UC知道是一部内容开放、自由的互动网络百科全书
客观、专业、权威的知识性百科全书
来源:百度知道 编辑:UC知道 时间:2024/05/22 19:16:15
例如:要包含头文件#include <fstream>
ofstream outfile2("变换后.txt");
if ( ! outfile2 )
{
cerr << "error: unable to open output file!\n";
return -2;
}
outfile2<<N<<endl;
outfile2<<diameter<<endl;