![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C++自学笔记
c++自学
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 评论 -
Linux c/c++实现简单网络库
Linux c/c++实现简单网络库client和server类的声明// file:network.h// Created by ppd on 21-3-8.// 主要实现:创建client和server类的//#include <iostream>#include<sys/socket.h>#include <sys/epoll.h>#include<arpa/inet.h>#include <string>using n原创 2021-03-09 18:05:11 · 427 阅读 · 0 评论