im working on something and i need the user to be able to enter times that things start and end. i need to know how i can store that and then compare them later. they need to be able to enter like 12:45. i was thinking i could somehow ignore the colon or something and just store 1245 as an int but i dont know how. any help is appreciated.
yamahammer342
0
Newbie Poster
Recommended Answers
Jump to Posterror checking and "dummy proofing" aside, you can probably store the input value to a string variable, then use the string methods with loops to process the string. Specifically, erase and find_first_of may be of interest:
http://www.cplusplus.com/reference/string/string/to get integer from a …
All 3 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.