So i made another Code in C in which i am making a program to stop working when the Licence has ended.
The Program Runs but lets say the date its suppose to end on June 20, 2012 so it triggers the Stop of use of the program.
This is just and example of what i am trying to say or get to:
if(SYSTEM DATE == MY DATE LIKE JUNE 20, 2012) printf("Sorry, Program needs to be renewed\N")
if(SYSTEM DATE > MY DATE LIKE JUNE 20, 2012) printf(" PROGRAMMED EXPIRED\n");/
if(SYSTEM DATE < MY DATE LIKE JUNE 20, 2012) printf("You still have time left for use");
for example, Where it says Is there a way i can put something or a code in which is read the system time?
like for example, lets say Variable "Date" is the string of code:
time_t t = time(0);
struct tm * now = localtime( &t );
printf("%d-%d-%d\n",
(now->tm_year + 1900),
(now->tm_mon + 1),
now->tm_mday)
so if i put "date" in if (date == my date like june 20, 2012) it really means the entire code above in which its being read and compared to June 20.
in which it would terminate the program.
i really suck in timing and time.h functions, a little help??