c语言中文件I/O:
FILE* pfile = fopen(“c:\1.txt”, ab );
fwrite();
fread();
fprintf();
fclose(pfile);
null
c++语言中文件I/O:
std::string chFileName = “c:\1.txt”;
ifstream fin( chFileName.c_str() );
std::string aLine;
while ( getline( fin, aLine ) )
{
//do what you want to do…
}
fin.close();
© 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END
暂无评论内容