摘要:
源程序: #include <iostream>using namespace std; class A{private: int x; const int y;public: A(int a, int b):x(a),y(b) //常变量必须在初始化列表中被初始化 { } void show() 阅读全文
摘要:
#include <iostream>using namespace std; class A{private: int a, b;public: A(int aa, int bb) { a = aa--; b = a*bb; } void show() { cout << "a=" << a << 阅读全文