Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //not by me
- #include <cstdio>
- #include <ctime>
- int main ()
- {
- std::time_t rawtime;
- std::tm* timeinfo;
- char buffer [80];
- std::time(&rawtime);
- timeinfo = std::localtime(&rawtime);
- std::strftime(buffer,80,"%Y-%m-%d-%H-%M-%S",timeinfo);
- std::puts(buffer);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement