time.h

来自「为ARM的一些结构化代码」· C头文件 代码 · 共 42 行

H
42
字号
/*************************************************
***********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 + =
减小字号Ctrl + -
显示快捷键?