Recently I ran a test and there was an issue that asked for a number like 123.456
to be displayed as 321.456
. I thought the best solution would be to convert this to an array of char
and then create an algorithm to print position by position, using pointers, with .
and
served as stop tokens. I've implemented the algorithm, but I'm not sure how to do this conversion from a float
char
to an array of float
so that each digit is in one position.
How do I convert a char
to an array of C/C++
into int
?
I was also curious how I can do this with other guys. char
to byte
, char
to char
and do the opposite process also ( float
to %code% ).