正在加载图片...
10.2 const(Constant) Objects and const Member Functions class time public Time (int =0, int =0, int =0 void setTime( int, int, int) void sethour(int ) void setMinute (int ) void setsecond(int int getHour( const; int getMinuteO const; int getSecondO const; void printUniversal0 const; void printstandardo万 P40110.13 private: int hour: int minute, int second, } o 2015, SEU. All rights reserved. 9© 2009, SEU. All rights reserved. © 2015, SEU. All rights reserved. 9 10.2 const (Constant) Objects and const Member Functions class Time { public: Time( int = 0, int = 0, int = 0 ); void setTime( int, int, int ); void setHour( int ); void setMinute( int ); void setSecond( int ); int getHour() const; int getMinute() const; int getSecond() const; void printUniversal() const; void printStandard(); private: int hour; int minute; int second; };
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有