我在这个问题上挣扎了几个小时:
char szKeyMap[MAX_ALPNUM_KEYS][CHAR_PER_KEY]= {"0- +%", "1QZ.\\", "2ABC&", "3DEF%", "4GHI*", "5JKL/", "6MNO~", "7PRS^", "8TUV[", "9WXY]", "*,'\":", "#=:$?" };
getkbd_entry(h_clock,insertPin,pinBuff,0,NUMERIC ,szKeyMap,sizeof(szKeyMap), 6 , 4);
getkbd_entry 原型是:
int getkbd_entry(int h_clock, char *msg, char *outbuf, unsigned wait,
unsigned type, char szKeyMap[][CHAR_PER_KEY],
int KeyMapSize, int va_alist, ...);
我在编译器中遇到的错误:
"C:\Bin\test.c", line 90: Warning: #167-D: argument of type "c
har *" is incompatible with parameter of type "signed char *"
getkbd_entry(h_clock,insertPin,pinBuff,0,NUMERIC ,szKeyMap,sizeof(szK
eyMap), 6 , 4);
^
"C:\Bin\test.c", line 90: Error: #167: argument of type "signe
d char (*)[6]" is incompatible with parameter of type "char *"
getkbd_entry(h_clock,insertPin,pinBuff,0,NUMERIC ,szKeyMap,sizeof(szK
eyMap), 6 , 4);
任何帮助深表感谢 !
谢谢