标签:lin for bsp ++ tin pow glin turn length
long HexToInt(char *msgline)
{
long strlength,chvalue,tvalue;
WORD i;
chvalue=0;
strlength=strlen(msgline);
for(i=0;i<strlength;i++)
{
if(msgline[i]==‘ ‘)
continue;
tvalue=msgline[i]-48;
if(tvalue>9)
{
tvalue=tvalue-7;
}
chvalue=chvalue+tvalue*(IntPower(16,(strlength-i-1)));
}
return chvalue;
}
标签:lin for bsp ++ tin pow glin turn length
原文地址:http://www.cnblogs.com/azbane/p/7509882.html