假设一个函数void File_Name(char *fn)作用是给一个char类型的数组赋值,但是现在要用此函数给一个unsigned char类型的数组fn1赋值,KEIL就会警告:
warning: #167-D: argument of type "unsigned char *" is incompatible with parameter of type "char *"
这时后只需要强制转换类型即可,格式如下:
File_Name((char *)fn1)
假设一个函数void File_Name(char *fn)作用是给一个char类型的数组赋值,但是现在要用此函数给一个unsigned char类型的数组fn1赋值,KEIL就会警告:
warning: #167-D: argument of type "unsigned char *" is incompatible with parameter of type "char *"
这时后只需要强制转换类型即可,格式如下:
File_Name((char *)fn1)