Saturday, May 9, 2009

C++ reference Parameter question?

I have to make a prgm. that uses 2 functions, 1 that reads in a time in mintues and seconds and another that displays the time like: 2:12:34.


Do you have any code suggestions, I'm stuck?

C++ reference Parameter question?
check out the time_t structure. and asctime() function in C.





after reading input from user (you could have one input line for hours, one for min, one for sec) you need to check the values (valid ranges 0..60 or 1..23). if any fail, re-read them all.





if they pass ranges, then place the values into a time_t and call asctime( ) - the output text will be nice and pretty.
Reply:theres a question similar to this in the archives.





i believe the complete code is provided in it as well.





its worth a search.
Reply:don't waste your time...out dated by 2 decades !!!!!!!!!!!!


No comments:

Post a Comment