摘要: 源程序: #include <iostream> using namespace std; class BaseClass { public: int v1, v2; BaseClass() { v1 = 1; v2 = 1; } int temp1() {} }; class DerivedCla 阅读全文
posted @ 2019-12-18 17:23 bobo哥 阅读(125) 评论(0) 推荐(0)
摘要: 源程序: // // main.cpp // p154 // // Created by duanqibo on 2019/12/18. // Copyright © 2019年 duanqibo. All rights reserved. // #include <iostream> using 阅读全文
posted @ 2019-12-18 16:24 bobo哥 阅读(185) 评论(0) 推荐(0)
摘要: 源程序: //"+"、"-"运算符重载 #include <iostream> using namespace std; class myComplex { private: double real, imag; public: myComplex(); myComplex(double x, do 阅读全文
posted @ 2019-12-18 14:56 bobo哥 阅读(208) 评论(0) 推荐(0)