11.02.2009, 00:59
Nice work!
I have a tip for you regarding formating the time and date.
Instead of:
you can do:
Putting a '02' between the '%' and the 'd' will result in a value with 2 numbers.
for example:
will result in:
You can do the same for the second format:
I have a tip for you regarding formating the time and date.
Instead of:
Код:
format(string, sizeof string, "%d/%s%d/2009", dia, ((mes < 10) ? ("0") : ("")), mes);
Код:
format(string, sizeof string, "%02d/%02d/2009", dia, mes);
for example:
Код:
format(str, sizeof(str), "Number: %02d", 4);
Quote:
Number: 04 |
Код:
format(string, sizeof string, "%02d:%02d:%02d", horas, minutos, segundos);