摘要: 源程序: #include <iostream>using namespace std; class Base1{public: Base1() { b1=6; } Base1(int i) { b1=i; } int get1() { return b1; }private: int b1;}; 阅读全文
posted @ 2020-12-28 21:04 bobo哥 阅读(100) 评论(0) 推荐(0)
摘要: 源程序: #include <iostream>using namespace std;class Point{private: int X,Y;public: Point(int a=0,int b=0) { X=a; Y=b; cout<<"Initializing……"<<endl; } Po 阅读全文
posted @ 2020-12-28 20:13 bobo哥 阅读(200) 评论(0) 推荐(0)
摘要: 源程序: #include <iostream>using namespace std;class Point //基类,也叫父类{protected: int x,y;public: Point(int a,int b) { x=a; y=b; } void show() { cout<<"x=" 阅读全文
posted @ 2020-12-28 19:31 bobo哥 阅读(145) 评论(0) 推荐(0)