📄 time.h
字号:
/*************************************************
***********Boys and Girls:************************
this file only gives partly an outline************
of Time class,please further implement************
other parts as requried in th experiment report.**
*************************************************/
#include <iostream.h>
/*
Notice:the following two lines can also replace "#include <iostream.h>"
#include <iostream>
using space std;
*/
//the following is the declaration of class Time
class Time
{
private:
int Hour; //hour
int Minute; //minute
int Second;//second
public:
Time(int h=0,int m=0 ,int s=0); //constructor with default parameter
~Time(); //deconstructor
Time(const Time &rf);
void ChangeTime(int h,int m,int s); //change the time as h,m,s specified
int GetHour(){return Hour;}; //inline function
int GetMinute(); //inline function
int Getsecond();
void PrintTime();//output the time
void Increaseonesecond();
void f(Time t);
};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -