I think you will have to use a stream manipulator for that, I forget which one, maybe std::ios::fixed or std::ios::setprecision. They're in <iomanip>.
http://www.cplusplus.com/reference/iostream/manipulators/
You can set the output stream to display leading zeroes, but my question is why do you want the zero to be shown?