Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <chrono>
- #include <ctime>
- void now()
- {
- auto now = std::chrono::system_clock::now();
- std::time_t now_time = std::chrono::system_clock::to_time_t(now);
- std::cout << "now is: " << std::ctime(&now_time);
- }
- int main()
- {
- now();
- }
Add Comment
Please, Sign In to add comment