中国开发网: 论坛: 程序员情感CBD: 贴子 68620
Yxd
回答你的第一个问题:用stl的流来做。
例1(标准输入输出流):
char szRead[260] = { 0 };
cin.get( szRead, 258, '\n' );
例2(文件流):
char szRead[260] = { 0 };
fstream file;
file.open( "filepath", ios_base::in | ios_base::binary );
if ( file.is_open() )
{
file.get( szRead, 258, '\n' );
file.close();
}

相关信息:


欢迎光临本社区,您还没有登录,不能发贴子。请在 这里登录