How to format int 1 to string 0001 in C++?
Hi guys,
In C++ as subjected, can anyone throw me some light on how I can generic-ly format an integer value of 1 to a string value of 0001? 11 to 0011? and 111 to 0111?
simply by just appending 0 in front and limiting the length of the string to 4?
Much Thanks!
Chinho
|