填空题

表达式x.operator+(y.operator++(0))还可以写成 。

【参考答案】

【13】x+y++或x+(y++)
<上一题 目录 下一题>
热门 试题

填空题
以下程序的执行结果是______。#include<iostream.h>class Sample{int n;public:Sample(){}Sample(int m){n+m;)int&operator--(int){n--return n;}void disp () {cout<< n= <<n<<end1;}}void main (){Sample s (10);(s--) ++;s.disp();}
填空题
有以下程序#include <iostream>using namespace std;class Base{int a;public:Base(int x){ a=x; }void show(){ cout<<a; }class Derived : public Base{int b;public:Derived(int i) :Base(i+1),b(i){}void show() { cout<<b;};int main (){Base b(5),*pb;Derived d(1);pb=&d;pb->show ();return 0;}运行后的打印结果是______。
相关试题
  • 深度为5的满二叉树有______个叶子结点。
  • 下面关于虚函数的描述,错误的是
  • 按照“先进先出”的原则组织数据的结构的是...
  • 每个以符号________开头的行,为编...
  • 在深度为7的满二叉树中,度为2的结点个数...