![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
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 · 230 阅读 · 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 · 609 阅读 · 0 评论