Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <ctime>
- using namespace std;
- int main()
- {
- time_t _tm =time(NULL);
- struct tm * curtime = localtime (&_tm);
- cout << "Day: " << curtime->tm_mday << " Month: " << curtime->tm_mon +1 << " Year: " << curtime->tm_year + 1900 << endl;
- cout << "Hour: " << curtime->tm_hour << " Minutes: " << curtime->tm_min << " Seconds: " << curtime->tm_sec << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement