I have a constructor in which I am trying to overrun time. So if the user enters 63 seconds, the 60 seconds get passed on to the minute because it is impossible to have 63 seconds in a minute. This is what I have. I need help with the commented section.
Time::Time(int hours, int minutes, int seconds, int millis) {
/*int add_millis = millis;
minutes -= add_millis*60000 ;
millis += add_millis;*/
int add_seconds = millis / 1000;
millis -= add_seconds * 1000;
seconds += add_seconds;
int add_minutes = seconds / 60;
seconds -= add_minutes * 60;
minutes += add_minutes;
int add_hours = minutes / 60;
minutes -= add_hours * 60;
hours += add_hours;
hours %= 24;