填空题
将x+y*z中的“+”用成员函数重载,“*”用友元函数重载应写为______。
【参考答案】
x.operator+(operator*(y,z)
点击查看答案
<上一题
目录
下一题>
热门
试题
填空题
以下程序的执行结果是______。 #include <iostream.h> void main() cout.fill(’*’); cout.width(10); cout<<123.45<<endl; cout.width(8); cout<<123.45<<endl; cout.width(4); cout<<123.45<<endl;
点击查看答案
填空题
下列程序的输出结果是______。 #include <iostream> using namespace std; void fun(int &rf) rf*=2; int main() int num=500; fun(num); cout<<num<<endl; return 0;
点击查看答案
相关试题
下面程序的功能是:将字符数组a中下标值为...
当循环队列非空且队尾指针等于队头指针时,...