![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C++
关于C++
yxl_d
这个作者很懒,什么都没留下…
展开
-
C++——继承
派生类定义(学生类) #include <iostream> #include <string> using namespace std; class Student//声明基类 { public: void get_value() { cin>>num>>name>>sex; } void...原创 2019-12-08 20:48:57 · 81 阅读 · 0 评论 -
C++——运算符重载
前置自加运算符重载Time类 #include <iostream> using namespace std; class Time { public: Time(){minute=0;sec=0;}//默认构造函数 Time(int m,int s):minute(m),sec(s){}//构造函数重载 ...原创 2019-12-08 20:48:18 · 148 阅读 · 0 评论