文件名称:exe3
介绍说明--下载内容均来自于网络,请自行研究使用
关于日期的加减
Date Date::operator++( int )
{
Date temp = *this // hold current state of object
helpIncrement()
return temp
} // end function operator++
const Date &Date::operator+=( int additionalDays )
{
for ( int i = 0 i < additionalDays i++ )
helpIncrement()
return *this }
bool Date::leapYear( int testYear ) const {
if ( testYear 400 == 0 ||
( testYear 100 != 0 && testYear 4 == 0 ) )
return true // a leap year else
return false // not a leap year
} // end function leapYear-On the date of the Modified Date Date:: operator++ (int) (Date temp =* this // hold current state of object helpIncrement () return temp )// end function operator++ const Date & Date:: operator+ = (int additionalDays ) (for (int i = 0 i < additionalDays i++) helpIncrement () return* this ) bool Date:: leapYear (int testYear) const (if (testYear 400 == 0 | | (testYear 100! = 0 & & testYear 4 == 0)) return true // a leap year else return false // not a leap year)// end function leapYear
Date Date::operator++( int )
{
Date temp = *this // hold current state of object
helpIncrement()
return temp
} // end function operator++
const Date &Date::operator+=( int additionalDays )
{
for ( int i = 0 i < additionalDays i++ )
helpIncrement()
return *this }
bool Date::leapYear( int testYear ) const {
if ( testYear 400 == 0 ||
( testYear 100 != 0 && testYear 4 == 0 ) )
return true // a leap year else
return false // not a leap year
} // end function leapYear-On the date of the Modified Date Date:: operator++ (int) (Date temp =* this // hold current state of object helpIncrement () return temp )// end function operator++ const Date & Date:: operator+ = (int additionalDays ) (for (int i = 0 i < additionalDays i++) helpIncrement () return* this ) bool Date:: leapYear (int testYear) const (if (testYear 400 == 0 | | (testYear 100! = 0 & & testYear 4 == 0)) return true // a leap year else return false // not a leap year)// end function leapYear
(系统自动生成,下载前可以参看下载内容)
下载文件列表
exe3.cpp