Ti mostro i due codici (nelle parti importanti) e vedi se comprendi la differenza ...
Ecco il primo ...
ed ecco il tuo ...codice:time_t t; struct tm *tm; t = time (NULL); tm = localtime (&t); printf ("\r%02d:%02d:%02d", tm->tm_hour, tm->tm_min, tm->tm_sec);
Secondo te?codice:struct tm *time; printf("\n%02d:%02d",time->tm_hour,time->tm_min);