I need to convert String^ type to hexadecimal string representation. I'm coding on MSVC++'05. Need help with the algorithm, have already tried the strtol function and it is not outputting the result i'm expecting.
String^ str = "993";
I wan str to be converted to hexadecimal which is 0x03E1, how do i go about do this? Any help or directions is greatly appreciated. Thanks in advance.
Transforming it into a hexadecimal is in the display portion of it.
String^ str = "993";
int value;
if(!Int32::TryParse(str,value))
{
Console::WriteLine("Failed, exiting");
return -1;
}
Console::WriteLine(value.ToString("X"));
This indicates the output should be hex -----^^^
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With