int hex_atoi (char *strBuf)
{
int Value, i;
char NumBuf[4];
for (i = 0; i < 4; i++)
{
if (strBuf[i] >= '0' && strBuf[i] <= '9')
NumBuf[i] = strBuf[i] - '0';
else if (tolower(strBuf[i])>='a' && tolower(strBuf[i])<='f')
NumBuf[i] = tolower(strBuf[i])-'a'+10;
else
break;
}
Value = NumBuf[0]*16*16*16 + NumBuf[1]*16*16 + NumBuf[2]*16 + NumBuf[3];
return (Value);
}
{
int Value, i;
char NumBuf[4];
for (i = 0; i < 4; i++)
{
if (strBuf[i] >= '0' && strBuf[i] <= '9')
NumBuf[i] = strBuf[i] - '0';
else if (tolower(strBuf[i])>='a' && tolower(strBuf[i])<='f')
NumBuf[i] = tolower(strBuf[i])-'a'+10;
else
break;
}
Value = NumBuf[0]*16*16*16 + NumBuf[1]*16*16 + NumBuf[2]*16 + NumBuf[3];
return (Value);
}
show=a+show;
show+=b;char *c=show.GetBuffer(show.GetLength());
....
strcpy(c, a); strcat(c, b);就行了