char l_IdentBuffer[1]= {"\0"};
int l_Sign = 0;
char *l_Identification = (char*)getdata->pGetNo(10, size, type);
memcpy(l_IdentBuffer,l_Identification +61 ,1);
printf("l_Identification = %s",l_Identification );
printf("l_IdentBuffer= %s",l_IdentBuffer);
l_Sign = l_IdentBuffer[0];
printf("l_Sign = %d",l_Sign );
输出l_IdentBuffer =3
B?o
但是l_Sign = 51
为什么?
怎么能让l_Sign 取得l_IdentBuffer 中的3
解决方案
40
一个是字符”3″一个是字符ascll值