写文件
fstream outfile(szPath,ios::out);
if(!outfile)
{
return false;
}
outfile<<"Hello,world"<<"\n";
outfile.close();
读文件
fstream infile(szPath);
if(!infile)
{
return false;
}
string strLine = "";
while(getline(infile,strLine))
{
ProcReadAtFile(strLine);
}
infile.close();