单项选择题
下面是重载为非成员函数的运算符函数原型,其中错误的是( )。
A.Fraction operator+(Fraction, Fraction);
B.Fraction operator — (Fraction);
C.Fraction& operator=(Fraction&, Fraction);
D.Fraction& operator+=(Fraction&, Fraction);
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
单项选择题
有如下程序: #inc1ude <iostream> using namespace std; c1ass AA{ intn; public: AA(int k):n(k){} int get0 {return n;} int get()const{retum n+1;) }; int main() { AA a(5); const AA b(6); eout<e_a.get()<<b.get(); return 0; } 执行后的输出结果是( )。
A.55
B.57
C.75
D.77
点击查看答案&解析
单项选择题
有如下程序: #inc1ude<iostream> using namespace std; void fl(int&x){x++;} void f2(int x){++x;} int main(){ int x=10,y=12; f1(x); f2(y); cout<<x+y<<end1; return 0; } 运行这个程序的输出结果是( )。
A.22
B.23
C.24
D.25
点击查看答案&解析
相关试题
计算斐波那契数列第n项的函数定义如下: i...
为了提高函数调用的实际运行速度,可以将较...
为了取代C中带参数的宏,在C++中使用( ...
下列有关内联函数的叙述中,正确的是( )。
已知函数fun的原型为 int fun (int, ...