Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - What do "%0.3d" and "%.3d" mean?
What do "%0.3d" and "%.3d" mean?

Output a three-digit integer, and use 0 to supplement the missing bits

For example, if you want to output a 1, use %0.3d to output 001

The same is true for %.3d Three digits, but if there are not enough, fill it with spaces, such as: 1

In short, the difference is whether to fill it with zeros or spaces.

Hope to adopt