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

📄 date.h

📁 this is a lp0 compilator new
💻 H
字号:
/***********************************************************************   Gerald Carter   cse 525   Spring 1994   date.h DESCRIPTION : This file contains the class declarations for a simple                date class.  All methods are documented in date.cc***********************************************************************/// INCLUDE FILES#include <iostream.h>#ifndef DATE_H#define DATE_Hclass date {   private :      int month, day, year;   // integer representation of day, month & year      int DateToDay (void);       // used in arithmetic operators      date DayToDate (int, int);  // used in arithmetic operators   public :      // CONSTRUCTORS      date (void) { month=1; day=1; year=1; }  // default      date (int, int, int);                    // specific date      date (const date&);                      // date intitialization      // OVERLOADED OPERATORS      date operator+ (int);              // add # days to this      date operator- (int);              // subtract # days from this      int operator> (const date&);       // integer comparison      int operator< (const date&);       // integer comparison      int operator== (const date&);      // integer comparison      friend ostream& operator<< (ostream&, const date&);   // put to       // GENERALD METHODS      date& ChangeDate (int, int, int);        // assign new date      int GetMonth (void) { return month; };        int GetDay (void) { return day; };      int GetYear (void) { return year; };};  // end of class date#endif

⌨️ 快捷键说明

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