this is a simple question … is there a way to convert a struct tm ct; to a long integer ? here’s how my code look like:
struct tm ct;
scanf("%d", &ct.tm_sec);
scanf("%d", &ct.tm_min);
scanf("%d", &ct.tm_hour);
scanf("%d", &ct.tm_mday);
scanf("%d", &ct.tm_mon);
scanf("%d", &ct.tm_year);
You can use the
mktime()function to convert astruct tminto atime_t, which is an integer value.