Is there a standard date/time class in C++?

前端 未结 6 1224
悲哀的现实
悲哀的现实 2020-12-01 14:05

Does C++ stl have a standard time class? Or do I have to convert to c-string before writing to a stream. Example, I want to output the current date/time to a string stream:<

6条回答
  •  时光说笑
    2020-12-01 14:29

    C++ now has the chrono libraries for date and time. This is documented on http://en.cppreference.com/w/cpp/chrono and http://www.cplusplus.com/reference/chrono/

提交回复
热议问题