date.h

来自「这个程序是一个日期(包括年月日)类的具体实现有各种功能下载后即可研究,它包括了C」· C头文件 代码 · 共 35 行

H
35
字号
#ifndef DATE_H
#define DATE_H

class Date
{
	
public:
	Date(int d1, int m1, int y1); 
	Date(int d1, int m1); 
	Date(int d1); 
	Date(); 
	int getDay(); 
	int getMonth(); 
	int getYear(); 
	friend Date& operator++(Date&); 
	friend Date& operator--(Date&); 
	Date& operator++(int); 
	Date& operator--(int); 
	void add_year(int n); 
	void add_month(int n); 
	void add_day(int n); 
	bool operator==(Date&);
	bool operator!=(Date&); 
	bool operator<=(Date&); 
	bool operator>=(Date&); 
	bool operator<(Date&); 
	bool operator>(Date&);
	int judge(int m,int y);
private:
	int day;
	int month;
	int year;
};

#endif 

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?