-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtime.h
34 lines (29 loc) · 755 Bytes
/
time.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#ifndef TIME_H
#define TIME_H
#include <iostream>
using namespace std;
#include <ctime>
class Time{
private:
int year;
int month;
int date;
int hours;
int min;
public:
Time(int m=0,int d=0, int h=0, int mi=0,int y=0);
void setMonth(int x);
void setDate(int x);
void setHours(int x);
void setMin(int x);
void setYear(int x);
int getMonth() const;
int getDate() const;
int getHours() const;
int getMin() const;
int getYear() const;
friend bool operator> (const Time &d1, const Time &d2);
friend ostream& operator<< (ostream &out, const Time &t1);
Time operator+(Time& t1);
};
#endif