Ockonal Ockonal - 1 year ago 98
C++ Question

How to get current time and date in C++?

Is there a cross-platform way to get the current date and time in C++?

Answer Source

std C libraries provide time(). This is seconds from the epoch and can be converted to date and H:M:S using standard C functions. Boost also has a time/date library that you can check.

time_t  timev;
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download