My function turns seconds to minutes. The problem is, if I have a number where the remainder is less than 10, it will just give give me remainder without a 0 before the remainder.
For example,
- 368 seconds would just turn to
6:8 - 360 would turn to
6:0 - 361 to
6:1
I would like
- 368 seconds to turn to
6:08 - 360 to
6:00 - 361 to
6:01
void toMinutesAndSeconds(int inSeconds, int &outMinutes, int &outSeconds) {
outMinutes = inSeconds / 60;
outSeconds = inSeconds % 60;
}
I'm outputting to a text file.