
C/C++
MRZZZERO
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
初学cpp<class类01>
//运用class例题 #include using namespace std; class Date { private: int Year; int Month; int Day; public: Date(){}//默认构造函数 Date(int y,int m,int d);//构造函数 void ShowDate(); void SetYear(int y); voi原创 2013-03-19 22:26:54 · 484 阅读 · 0 评论 -
初学cpp<classl类02>
#include using namespace std; class Array { public: Array(); //无参数的构造函数 Array(int n); //带参数的构造函数 Array(const int a[],int n); //构造函数,用数组a对动态数组进行初始化,n为a数组的长度 Array(const Array &v); //复制原创 2013-03-20 17:09:27 · 407 阅读 · 0 评论 -
初学cpp<类+运算符重载>
#include using namespace std; int gcd(int a,int b); class Fraction { public: Fraction(); Fraction(int a,int b); Fraction(const Fraction &c); //复制 ~Fraction(); Fraction operator+(const Fraction原创 2013-03-26 22:39:50 · 549 阅读 · 0 评论