填空题

在C++中,设置虚基类的目的是 【14】 。

【参考答案】

解决二义性问题
<上一题 目录 下一题>
热门 试题

填空题
以下程序执行后输出的结果是 【15】 。 #include<iostream> #include<fstream> using namespace std; int main() ofstream ofile( D: temp.txt ); if(!ofile) cout<< temp.txt cannot open <<endl; return 0; ofile<< This is a book << <<54321<<endl; ofile.close(); ifstream ifile( D: temp.txt ); if(!ifile) cout<< temp.txt cannot open <<endl; return 0; charstr[40]; ifile >> str; ifile.close(); cout<<Str<<endl; return 1;
填空题
下列程序在构造函数和析构函数中申请和释放类的私有成员,请完成该程序。 class Myclas int *x; public: MyClas(int n); ~MyClas(); ; MyClas::MyClas(intn) 【12】 ; MyClas::~MyClas() 【13】 ;
相关试题
  • 在结构化方法中,用数据流程图(DFC) 作...
  • 下列对于软件测试的描述,正确的是( )。
  • 一个int型变量,在程序中多次频繁使用,最...
  • 下列叙述中错误的是( )。
  • 设一棵完全二叉树共有699个节点,则在该...