ADD file via upload

main
pi5fnqcfr 6 months ago
parent bb02038917
commit 0ed7005b7f

@ -0,0 +1,26 @@
#ifndef DATE_H
#define DATE_H
#include <iostream>
#include <string>
using namespace std;
class Date
{
public:
Date(int year = 0, int month = 0, int day = 0);//构造函数
string ShowDate();//输出日期
int getYear() const { return year; }//外部访问接口,获取年
int getMonth() const { return month; }//外部访问接口,获取月
int getDay() const { return day; }//外部访问接口,获取天
protected:
private:
int year;
int month;
int day;
};
#endif // DATE_H
Loading…
Cancel
Save