下面这段错误信息是啥意思,'TranslateAcceleratorA' :cannot convert parameter 2 from 'void *' to 'struct HACCEL__ *'Conversion from 'void*' to pointer to non-'void' requires an explicit cast

来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/24 05:19:15
下面这段错误信息是啥意思,''TranslateAcceleratorA'':cannotconvertparameter2from''void*''to''structHACCEL__*''Conversion

下面这段错误信息是啥意思,'TranslateAcceleratorA' :cannot convert parameter 2 from 'void *' to 'struct HACCEL__ *'Conversion from 'void*' to pointer to non-'void' requires an explicit cast
下面这段错误信息是啥意思,
'TranslateAcceleratorA' :cannot convert parameter 2 from 'void *' to 'struct HACCEL__ *'
Conversion from 'void*' to pointer to non-'void' requires an explicit cast

下面这段错误信息是啥意思,'TranslateAcceleratorA' :cannot convert parameter 2 from 'void *' to 'struct HACCEL__ *'Conversion from 'void*' to pointer to non-'void' requires an explicit cast
TranslateAccelerator的第二个参数是HACCEL类型的.你把hAccel定义为HANDLE形态且在呼叫TranslateAccelerator时没有在参数前使用强制类型转换,因此编译出错了.解决方法,可把hAccel直接定义为HACCEL形态或在参数前使用强制类型转换.