Code: Select all
char FindAsciiHexaCodeValue(char CodeAscii)
{
if ((CodeAscii<'0')||(CodeAscii<'A')) return 0;
if (CodeAscii<='9') return CodeAscii-'0';
if (CodeAscii<='F') return CodeAscii-'A'+10;
return 0;
}
//----------------------------------------------------------------------------
unsigned int ConvertStringHexaToInt(char *StringH)
{
char x1,y1;
unsigned int Resultat=0;
StringH=ltrim(StringH);
for (x1=0;x1<strlen(StringH);x1++)
{
Resultat=(Resultat<<4)+ FindAsciiHexaCodeValue(StringH[x1]);
}
return Resultat;
}
I need do do the same but for a "unsigned long long" variable and it doesn't works anymore !
Why ?
Also I found that just a single code like this one " unsigned long long Resultat=0;" doesn't work !