Example:

while(1)
{
/*This is to get the time.*/
int uur, min, sec, i;
time_t rawtime;
struct tm* time_;
time(&rawtime);
time_ = localtime(&rawtime);
/*Names the time,just for easy use*/
hour = time_->tm_hour;
min = time_->tm_min;
sec = time_->tm_sec;
for (i=0; i<24; i++)
printf("%d, ", i);
Sleep(1000);
system ("cls");
/*Test for time*/
/*printf("Current Time:\n");
printf("%i:%i:%i\n", hour, min, sec);*/
}
What i would like to get is that the current hour gets colored in the array, but i couldn't find out how to do this.
Hope you guys could tell me how to do this?

New Topic/Question
Reply


MultiQuote


|