Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void countdown(int time)
- {
- int h = (time / 3600);
- int m = (time / 60) - (h * 60);
- int s = time % 60;
- std::stringstream ss;
- ss << h << ":" << m << ":" << s;
- std::string string = ss.str();
- cout << "r" << string << endl;
- }
- cout << "r" << string << endl;
- 23:59:59
- 0:0:0
- std::cout << 'r'
- << std::setw(2) << std::setfill('0') << h << ':'
- << std::setw(2) << m << ':'
- << std::setw(2) << s << std::flush;
- cout << "r" << string ; works
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement