![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
面向对象的程序设计(C++)
「已注销」
北京大学计算机应用技术专业机器学习方向硕士研究生。
展开
-
一个简单的矩形类
#include using namespace std; class CRectangle{ public: int w, h; //width height void Init(int w_, int h_); int area(); int perimeter(); }; void CRectangle::Init(int w_, int h_) { w = w_; h =原创 2015-03-09 19:42:55 · 1089 阅读 · 0 评论 -
一个简单的学生类
代码如下: #include #include #include #include using namespace std; class Student{ private: char stuName[10]; int stuAge; char stuNo[10]; int stuGAve[4]; public: Student(char* name,int age,ch原创 2015-03-11 15:22:37 · 760 阅读 · 0 评论