0 Replies - 1773 Views - Last Post: 03 October 2012 - 02:35 AM

#1 ThaJetsa  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 03-October 12

Coloring specific item [Right one!]

Posted 03 October 2012 - 02:35 AM

Hello, i would like to have a clock array style which colors the current time
Example:
Posted Image

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?

Is This A Good Question/Topic? 0
  • +

Page 1 of 1