C++编程题:设计一个时间类(Time),有年、月、日3个属性

日期:2017-12-15 12:51:22 人气:1

C++编程题:设计一个时间类(Time),有年、月、日3个属性

#include using namespace std; class Date//定义日期类 {public: Date(int,int,int);//声明构造函数 friend void display(Date &);//声明友元函数显示日期 private: int year;//定义年 int month;//定义月 int day;//定义日 }; class Time&
    A+
热门评论