When you hit 60 seconds just subtract one from the minute variable likewise when you hit 60 minutes subtract one from the hour variable and set the minutes to 0.
if (minutes == 60)
{
hours -= 1;
}
if (seconds == 60)
{
minutes -= 1;
}
AMD Phenom II X6 1090T 3.2GHz
XFX ATI Radeon 5770 1GB GDDR5
ASUS M4A89GTD Pro USB 3.0
CORSAIR XMS3 4GB 1600MHz
THERMALTAKE V3
SEAGATE 500GB
WINDOWS 7 ULTIMATE 64 Bit
Just make sure you use doubles everywhere, by putting a dot (".") at the end of each numeric constant. You shouldn't have any problems with overflow then.
Yep, what Alvaro said. Calculating the time manually is complicated, you will need to consider leap years and other quirks in the calendar system, which is pain in the arse. Use standard functions and libraries to do this.