16,471
社区成员
发帖
与我相关
我的任务
分享
static char strBuffer[3]= "";
static char k = 0;
char Input[3]= "";
Input[0] = NULL;
if((char)nChar<0)
{//是汉字
strBuffer[k] = (char)nChar;
if(k==1)
{
k = 0;
strBuffer[2] = NULL;
strcpy(Input, strBuffer);
}
else
{
++k;
}
}
else
{
Input[0] = (char)nChar;
Input[1] = NULL;
}