早教吧 育儿知识 作业答案 考试题库 百科 知识分享

(1)要建立文件流并打开当前目录下的文件file.dat用于输入,下列语句中错误的是A)ifstreamfin=ifstream.open("file.dat");B)ifstream*fin=newifstream("file.dat");C)ifstreamfin;fin.open("file.dat");D)ifstream*fin=newifstream

题目详情
(1)要建立文件流并打开当前目录下的文件file.dat用于输入,下列语句中错误的是
A)ifstreamfin = ifstream.open("file.dat");
B)ifstream *fin = newifstream("file.dat");
C)ifstream fin;
fin.open("file.dat");
D)ifstream *fin=new ifstream();
fin->open("file.dat");
▼优质解答
答案和解析
A错误.
ifstream.open()函数返回的不是一个ifstream对象.
看了(1)要建立文件流并打开当前目...的网友还看了以下: