cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
please notice
please notice
Oct 25, 2011 at 4:28pm UTC
Qurbanli
(6)
i wanna input clock like this 04:56,but i don't know how to put colon here.
please help.
Oct 25, 2011 at 4:37pm UTC
Intrexa
(291)
You can build it as a string.
http://cplusplus.com/reference/clibrary/ctime/tm/
string formattedTime = string(time.tm_hour) +
":"
+ string(time.tm_min);
You would need to properly format the minutes if there is less then 10 minutes.
Topic archived. No new replies allowed.