⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 date.h

📁 这个程序是一个日期(包括年月日)类的具体实现有各种功能下载后即可研究,它包括了C++面向对象的几乎所有内容,对初学面向对象的学生十分有帮助.
💻 H
字号:
#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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -