G
Guest
I'm learning C++ and was stuck when writing code to convert a negative
decimal number string to a hexdecimal number. For example, suppose the
function interface is defined as:
int atoi( const char*, size_t radix)
One input string is "-1234" and radix is 16.
How to get the correct hexdecimal integer? Can anyone help ? Thanks in
advance!
decimal number string to a hexdecimal number. For example, suppose the
function interface is defined as:
int atoi( const char*, size_t radix)
One input string is "-1234" and radix is 16.
How to get the correct hexdecimal integer? Can anyone help ? Thanks in
advance!