全文预览

马钢钢板质保书

上传者:qnrdwb |  格式:doc  |  页数:3 |  大小:425KB

文档介绍
void setHour( int hr );? void setMinute( int mn );? bool equal( const Time& tm ) const; // change to ==? bool lessThan( const Time& tm ) const;?// change to <? void print ( ostream& ostr ) const; // change to <<Аprivate:? int hour;? int min;?};Рtime.hРOperator OverloadingРWhat is an operator?РOperator OverloadingРWhat is an operator?РAnswer: + - & * . [ ] ++ % РExample: num = 4 + 5; // has two operatorsРOperator OverloadingРWhat is an operator?РAnswer: + - & * . [ ] ++ % РExample: num = 4 + 5; // has two operatorsРWhat is overloading?РOperator OverloadingРWhat is an operator?РAnswer: + - & * . [ ] ++ % РExample: num = 4 + 5; // has two operatorsРWhat is overloading?РAnswer: two or more functions with the same name but different parameter listРExample: void foo ( int );? void foo ( string);

收藏

分享

举报
下载此文档