12 2021 档案

摘要:一、 基类的指针指向派生类的,运行基类的相关函数变量。 #include<bits/stdc++.h> using namespace std; class base{ public: int a = 1; void test(){ cout<<"base"<<endl; } }; class ge 阅读全文
posted @ 2021-12-05 19:47 wanghai673 阅读(26) 评论(0) 推荐(0) 编辑
摘要:一、 继承与派生的基本概念 #include<bits/stdc++.h> using namespace std; class Student{ private: string name; char sex; int height,weight; public: Student(string _n 阅读全文
posted @ 2021-12-01 17:17 wanghai673 阅读(34) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示