I got string "FFFF6472", and want to convert it to -39822 like below:
std::string hex = "FFFF6472";
int dec = hex_to_int(hex);
printf("%d", dec); // -39822
Are there any supported functions like 'hex_to_int' in standard library?
I got string "FFFF6472", and want to convert it to -39822 like below:
std::string hex = "FFFF6472";
int dec = hex_to_int(hex);
printf("%d", dec); // -39822
Are there any supported functions like 'hex_to_int' in standard library?