填空题
多数运算符既能作为类的成员函数重载,也能作为类的非成员函数重载,但[ ]运算符只能作为类的______函数重载。
【参考答案】
成员
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
填空题
补充完整下面的类定义: class XCH char*a; public: XCH(char*aa) 构造函数 a=new char[strlen(aa)+1]; strcpy(a,aa); XCH& operator=(const XCH& x) 重载赋值函数 delete[]a; a=new char[strlen(x,a)+1]; strcpy(a,x,a); ______; ~XCH( )delete[]a;)
点击查看答案
填空题
若下列程序运行时输出结果为 1,A,10.1 2,B,3.5 请将程序补充完整。 #include<iostream> using namespace std; int main() void test(mt,char,double______); test(1,’A’,10.1); test(2,’B’); return 0; void test(int a,char b,double c) cout<<a<<’,’<<b<<’,’<<c<<endl;
点击查看答案&解析
相关试题
设有定义:int n1=0,n2,*p=&n2...
在下列关系运算中,可能改变关系中属性个数...
下列叙述中正确的是()。
下列程序的输出结果是() #include <i...
下面程序的运行结果是() #include<ios...