C++学习
文章平均质量分 50
Aries_0324
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
2.C++异常处理
2.C++异常处理学习 1.catch捕获异常时,不会进行数据类型的默认转换 1.1 能够正常捕获异常 #include<iostream> using namespace std; int main(){ cout<<"1--befroe try block..."<<endl; try{ cout<<"2--Inside try block..."<<endl; throw 10;原创 2021-08-12 21:10:19 · 373 阅读 · 2 评论 -
1.C++继承访问权限
1.C++继承访问权限 1.公有继承 派生类不可访问基类私有成员,可通过基类的公有成员函数访问 #include<iostream> using namespace std; //基类 class base{ int x; public: void setx(int n){ x=n; } int getx(){ return x; } void showx() { cout<<x<<endl; } }; //派生类 class derived:public原创 2021-08-11 22:40:43 · 757 阅读 · 0 评论
分享