A、 纯虚函数是一种特殊的虚函数,它没有具体的实现 B、抽象类是指具有纯虚函数的类 C、一个基类中说明具有纯虚函数,该基类的派生类一定不再是抽象类 D、抽象类只能作为基类来使用,其纯虚函数的实现由派生类给出
单项选择题以下程序的执行结果是()。 #include<iostream.h> #include<iomanip.h> void fun(int n) if(n!=0) fun(n-1); for(int i=1 ;i<=n;i++) cout<<setw(3)<<i; cout<<end1; void main() fun(3);
A、 B、 C、 D、
单项选择题将x+y*z中的“+”用成员函数重载,“*”用友元函数重载应写为()。
A、 operator+(operator* (y,z)) B、 x.operator+(operator* (y,z)) C、 x.operator+(x*(y,z)) D、 x +(operator*(y,z))