单项选择题

有如下程序: #inc1ude<iostream> Using namespace std; Class Amount{ int amount; public; Amount(int n=0): amount(n){} Int getAmount()const {retum amount;} Amount &operator+=(Amount a){ amount+=a.amount; retum ; } }; int main(){ Amount x(3),y(7); x+=y; cout<<x.getAmount()<<end1; retum 0; } 已知程序的运行结果是10,则下划线处缺失的表达式是( )。

A.*this
B.this
C.&amount
D.amount
题目列表

你可能感兴趣的试题

微信扫码免费搜题