📄 time.h
字号:
// Exercise 19.1 Time.h
// Definition of Time class
#ifndef TIME_H
#define TIME_H
#include <iostream>
class Time {
public:
Time(): hours(0),minutes(0), seconds(0){} // Default constructor
Time(int h, int m, int s); // Constructor
int getHours()const { return hours; }
int getMinutes()const { return minutes; }
int getSeconds()const { return seconds; }
private:
int hours;
int minutes;
int seconds;
};
std::ostream& operator <<(std::ostream& out, const Time& rT); // Overloaded operator declaration
#endif //TIME_H
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -