Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- #include <time.h>
- int main()
- {
- time_t s, val = 1;
- struct tm* current_time;
- s = time(NULL);
- current_time = localtime(&s);
- cout<<current_time->tm_hour<<":"<<current_time->tm_min<<":"<<current_time->tm_sec;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment