for example, if i add 90 minutes to 0700, it is supposed to be 0830, but it comes out as 0790.
any help would be appreciated. :(
In c++, how do i make time show as 0830 instead of 0790?
maybe this site can help you
http://www.radcpp.com/article.php?art_id...
Reply:1. Try to create two variables. the first one for the seconds, and the second one for the minutes.
2. Check if the seconds variable is grater than 60 then add plus one to the minutes variable, and the reminder should stay in seconds variable.
3. Do not forget to give me five. ;)
Reply:It sounds like you're using a simple integer to store your time. You don't say what operating system you're using. If you're using Visual Studio in Windows, you can use the MFC CTime class that allows you to add and subtract times.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment