填空题

多数运算符既能作为类的成员函数重载,也能作为类的非成员函数重载,但口运算符只能作为类的 【14】 函数重载。

【参考答案】

成员
<上一题 目录 下一题>
热门 试题

填空题
非成员函数应声明为类的 【10】 函数才能访问这个类的private成员。
填空题
下列程序的输出结果为: Object id=0 Object id=1请将程序补充完整。 #include <iostream> using namespace std; class Point public: Point(int xx=0,int yy=0) X=xx;Y=yy;countP++; ~Point() countP--; int GetX() return X; int GetY() return Y; static void GetC0 cout << Objectid= <<countp<<end1; private: int X,Y; static int countP; ; 【9】 静态数据成员的初始化 int main() Point:: GetC(); Point A(4,5); A.GetC(); return 0;
相关试题
  • 要定义一个具有5个元素的一维数组vect,并...
  • 下列叙述中正确的是______ 。
  • 执行语句序列: int i=0;while (i<...
  • 下列字符串中,正确的C++标识符是___...
  • 下列关于C++函数的叙述中,正确的是__...