Created
December 17, 2018 19:27
-
-
Save naruse/9a4a1ab377350df56f69ae16d61c1a0b to your computer and use it in GitHub Desktop.
Date.h
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
using namespace::std; | |
class Date { | |
public: | |
int year; | |
int month; | |
int day; | |
int hour; | |
int minute; | |
Date(int yr, int mth, int dy, int hr, int mn) : | |
year(yr), month(mth), day(dy), hour(hr), minute(mn) {} | |
string ToString() { | |
return to_string(year) + " " + to_string(month) + " " + to_string(day) + " " + to_string(hour) + " " + to_string(minute); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment