Question regarding 0's

I am writing a program to convert time from 12-hour notation to 24-hour notation. Everything works great, however, when I input a time such as 3:00 pm, the compiler outputs 15:0. As long as my time contains :00, I am only getting back :0. I don't know how to get back both of the zeros. And since the minutes for time is an int value, I can't use setprecision(2). If someone could please identify what my problem is, I would greatly appreciate it. Thank you.
would you mind posting some code to repeat the issue?
1
2
3
#include <iomanip>

std::cout << std::setw(2) << std::setfill('0') << 0 << std::endl;
Topic archived. No new replies allowed.