Skip to content

Instantly share code, notes, and snippets.

@naruse
Created December 17, 2018 19:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save naruse/9a4a1ab377350df56f69ae16d61c1a0b to your computer and use it in GitHub Desktop.
Save naruse/9a4a1ab377350df56f69ae16d61c1a0b to your computer and use it in GitHub Desktop.
Date.h
#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