I tried that also, however the program crashes, and the difftime() return value is always the same no matter how i change the expire TM struct
Code:
void CMk3dpdek::programExpiration(void)
{
double difference = 0;
time_t systime, today_t, expire_t;
struct tm expire;
expire.tm_mday = 9;
expire.tm_mon = 6;
expire.tm_year = 2004;
time(&systime);
struct tm *today = localtime(&systime);
today_t = mktime(today);
expire_t = mktime(&expire);
difference = difftime(today_t, expire_t);
cout << endl << "THE DIFF IS : " << difference << endl;
cout << endl << "TODAY TIME : " << ctime(&today_t);
cout << endl << "EXPIRE TIME : " << ctime(&expire_t);
}