-
Editbox problem
In my program it has an editbox which holds a 4 digit number and uses the registry to store it. but if i was to write "0123" in the editbox, but when i come back to it, it would be just "123". I don't want this, I would format it to have zeros in front of it. But is their another way?
cal
-
As you probably already know, standard c/c++ library ato* functions truncate zeros if they are in front of a whole-number string. To combat this, I would suggest reading/writing the string one character at a time before converting it to numerical (integer, float, double) type data.
Or perhaps , writing the value as a string.
hope this helps
-
Store the number as ascii instead of an integer.