📄 specialdate.h
字号:
#ifndef SPECIALDATE_H
#define SPECIALDATE_H
#include "date.h"
class SpecialDate : public Date
{
public:
SpecialDate( int d, int m, int y ) : Date( m, d, y ) { }
virtual void display( void ) const ;
bool isNullDate( void ) const
{ return ndays == 0 ; }
private:
static char *mos[] ;
} ;
char* SpecialDate::mos[] = {
"January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December"
} ;
void SpecialDate::display( void ) const
{
if ( !isNullDate() )
cout << mos[getMonth() - 1] << ' ' << getDay() << ", " << getYear() << endl ;
}
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -