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

📄 date.h

📁 data+structures+using+c的源码
💻 H
字号:
#ifndef date_H
#define date_H

class dateType
{
public:
    void setDate(int month, int day, int year);
		//Function to set the date.
		//Data members dMonth, dDay, and dYear are set 
		//according to the parameters
		//Postcondition: dMonth = month; dDay = day;
		// 		    dYear = year

	void getDate(int& month, int& day, int& year);
		//Function to return the date.
		//Postcondition: month = dMonth; day = dDay;
		//		    year = dYear

    void printDate() const;
		//Function to output the date in the form mm-dd-yyyy.

    dateType(int month = 1, int day = 1, int year = 1900);
		//Constructor to set the date
		//Data members dMonth, dDay, and dYear are set 
		//according to the parameters
		//Postcondition: dMonth = month; dDay = day; 
		//                	dYear = year
		//If no values are specified, the default values are 
		//used to initialize the data members.

private:
    int dMonth;		//variable to store the month
    int dDay;		//variable to store the day
    int dYear;		//variable to store the year
};


#endif

⌨️ 快捷键说明

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