Can someone explain this
#1

Hello guys!

Can someone explain me what this %02d does in this code:
Код:
format(str, 32, "%02d:%02d", var1, var2);
Reply
#2

%d or %i insert a number into the string

the 2 tells the function that the number always need to be 2 cells long

the 0 before the 2 just tells the function to use a 0 instead of a space if the number doesnt use 2 cells
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)