未分类题
下面程序的预设功能是:将文本文件readme 中的内容读出,显示在屏幕上。
include <fstream>
using namespace std;
int main ()
{
char buf[ 80 ];
ifstream file( 'readme');
while (_______________)
{
file.getline( buf, 80 );
cout<<buf<<end1;
}
me. close();
}
则程序中空白处应填入的语句为【 】。
A.getline(
【参考答案】
!file.eof()
!file.eof() 解析:文件流对象的成员函数eof的功能是在进行输入操作时,若达到......
(↓↓↓ 点击下方‘点击查看答案’看完整答案 ↓↓↓)