#include <time.h>
time_t whatTime(const char* month, const char* day, const char* year)
{
time_t rawTime;
time(&rawTime);
struct tm* convTime = localtime(&rawTime);
std::cout << "Today is: " << ((convTime->tm_mon)+1) << "/"
<< convTime->tm_mday << "/"
<< convTime->tm_year << std::endl;
}
When using this code I get the output '7/27/111'
Why does the year appear as 111 instead of 11?