English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

2 answers

int HexToInt(char * pString)
{
int result = 0;
while (*pString)
{
result <<= 4;
if ( (*pString >= '0') && (*pString <= '9'))
result += (*pString - '0');
else if ( (*pString >= 'A') && (*pString <= 'F'))
result += (*pString - 'A' + 10);
else if ( (*pString >= 'a') && (*pString <= 'f'))
result += (*pString - 'a' + 10);
pString++;
}
return result;
}

2007-08-15 17:53:29 · answer #1 · answered by Mark F 6 · 1 0

cout << dec << 0x25 ;

2007-08-16 00:40:42 · answer #2 · answered by mdigitale 7 · 1 0

fedest.com, questions and answers