问题
单项选择题
下列打开文件的表达式中,错误的是( )。
A.ofstream ofile;ofilopen("C:\\vc\\txt",ios::binar;
B.fstream iofile;iofilopen("txt",ios::at;
C.ifstream ifile("C:\\vc\\txt");
D.couopen("C:\\vc\\txt",ios::binar;
答案
参考答案:D
解析: 选项D中,open()函数并不是cout对象中的成员函数,因此对open()函数的调用是非法的。