Convert a decimal integer to hex
Anoniem
Assuming the conversion is from string to string (e.g. "10" => "A"), we can take several steps to convert: 1. Convert number string to int or uint (assume str is a decimal number string): unsigned int num = 0; for (int i = 0; i > 4; if (num < 10) hexStr = (num+'0') + hexStr; else hexStr = (num+'A') + hexStr; }