![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
c++
三省少年
路漫漫其修远兮,吾将上下而求索!
展开
-
蜜汁错误
#includeusing namespace std;class Student{private: int num; char name[20]; char sex;public: void display(); void set();};void Student::set(){ cin>>num>>name>>sex;}void Student::display(原创 2016-12-03 14:48:30 · 312 阅读 · 0 评论 -
带参数的构造函数
#includeusing namespace std;class Student{public: Student(int x=0,int y=0,char z='A') { num=x; score=y; level=z; } void display();private: int num; int score; char level;};void Stud原创 2016-12-03 15:23:53 · 880 阅读 · 0 评论 -
c++运算符的重载
//复数相加,运算符重载实现#includeusing namespace std;class Complex{public: Complex(int i=0,int j=0) { x=i; y=j; } Complex operator+(Complex &c); void display(); private: int x,y; }; Complex Com原创 2016-12-03 16:38:45 · 256 阅读 · 0 评论 -
C++基本告一段落
c++基本告一段落。继承,多态。下午考试加油咯。原创 2016-12-04 11:03:08 · 228 阅读 · 0 评论