This may probably be too trivial but I can not think anymore and I am completely stuck. This is the problem -
I am receiving a string (5 digits long) from another computer (over a socket), and I need to convert it to an integer like this -
In String- "00275"
Understand it as integer 275
and vice-versa as
Out integer - 483
send as string "00483"
I tried atoi and itoa but they strip the zeros (which I definitely need during communication).
Any help is appreciated.
Thanks
Azad
I am receiving a string (5 digits long) from another computer (over a socket), and I need to convert it to an integer like this -
In String- "00275"
Understand it as integer 275
and vice-versa as
Out integer - 483
send as string "00483"
I tried atoi and itoa but they strip the zeros (which I definitely need during communication).
Any help is appreciated.
Thanks
Azad