![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C++学习笔记
文章平均质量分 59
cjz-lxg
小白
展开
-
C++学习笔记(至4.15)
2022.3.22 类成员,类的组合,友元 常对象只能调用它的常成员函数,而不能调用普通的成员 #include<iostream> //例3.40-2 using namespace std; class Sample{ private: int n; public: int m; Sample(int i,int j){ m=i; n=j; } void setvalue(int i){ n=i; } void disply() {cout<原创 2022-04-16 09:52:45 · 112 阅读 · 0 评论 -
C++学习笔记2022.3.22
2022.3.22 类成员,类的组合,友元 常对象只能调用它的常成员函数,而不能调用普通的成员 #include<iostream> //例3.40-2 using namespace std; class Sample{ private: int n; public: int m; Sample(int i,int j){ m=i; n=j; } void setvalue(int i){ n=i; } void disply() {cout<原创 2022-03-22 18:08:39 · 1182 阅读 · 0 评论 -
2020.3.4
2022.3.4 类与对象的基本性质 #include<iostream> #include<vector> #include<algorithm> #include<cmath> #include<stack> #pragma warning (disable:4996) #include<queue> using namespace std; class A { double a; double b; public : v原创 2022-03-04 17:58:13 · 116 阅读 · 0 评论