ccc_time.h

来自「BigC++的源码」· C头文件 代码 · 共 57 行

H
57
字号
#ifndef CCC_TIME_H#define CCC_TIME_H/**   A class that describes a time of day   (between 00:00:00 and 23:59:59)*/class Time{public:   /**      Constructs a time of day.      @param hour the hours      @param min the minutes      @param sec the seconds   */   Time(int hour, int min, int sec);   /**      Constructs a Time object that is set to       the time at which the constructor executes.   */   Time();   /**      Gets the hours of this time.      @return the hours   */   int get_hours() const;   /**      Gets the minutes of this time.      @return the minutes   */   int get_minutes() const;   /**      Gets the seconds of this time.      @return the seconds   */   int get_seconds() const;   /**      Computes the seconds between this time and another.      @param t the other time      @return the number of seconds between this time and t   */   int seconds_from(Time t) const;   /**      Adds a number of seconds to this time.      @param s the number of seconds to add   */   void add_seconds(int s);private:   int time_in_secs;};#endif

⌨️ 快捷键说明

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