问题

若磁盘上已存在某个文本文件,其全路径文件名为 d:\ncre\test.txt ,下列语句中不 能打开该文件的是

A . ifstream file("d:\ncre\test.txt") ;

B . ifstream file("d:\ncre\test.txt");

C . ifstream file; file.open("d:\ncre\test.txt");

D . ifstream* pFile=new ifstream("d:\ncre\test.txt");

参考答案
您可能感兴趣的试题
  • 有如下类定义:class Foo{public:Foo(int v):value(v){} // ①~Foo(){} // ②private:Foo(){} // ③int value = 0; //
  • 有如下类定义:class Point{int x_, y_;public:Point():x_(0), y_(0){}Point(int x, int y = 0):x_(x),y_(y){}};若执
  • 有如下类定义:class Test{public:Test(){ a = 0; c = 0;} // ①int f(int a)const{this->a = a;} // ②static int g
  • 有如下程序:#includeusing namespace std;class A{public:A(){cout$amp;~A(){cout$amp;};class B:public A{A* p;
  • 有如下程序:#includeusing namespace std;class Base{private:void funl() const{cout$amp;protected:void fun2(
  • 有如下程序:#includeusing namespace std;class Base{public:void funl(){cout$amp;virtual void fun2(){cout$am