c++ get system date code example
Example: c++ get system date
#include
#include
#include
time_t t = time(0); // get time now
struct tm * now = localtime( & t );
ostringstream osTime;
osTime << (now->tm_year + 1900) <<
(now->tm_mon + 1) <<
now->tm_mday <<
"\n";
cout << osTime.str();