【2016.4.1】CDate类相关注记
编写一个日期类CDate,使得能够设置日期、显示日期、实现前置自增后置自增的重载函数。
该类的框架定义如下:
class CDate
{
private:
int year, month, day; //年月日
static const int days[12]; //定义月份的天数,默认是闰年,用法:day=days[month-1]
public:
CDate(int Y = 2
原创
2016-04-01 15:59:48 ·
475 阅读 ·
0 评论