不确定如何修复此错误?
这是消息...
error C2664: 'glutSpecialFunc' : cannot convert parameter 1 from 'void (__cdecl *)(unsigned char,int,int)' to 'void (__cdecl *)(int,int,int)'
1> None of the functions with this name in scope match the target type
这是我的代码....
该函数在 main 中调用。
glutSpecialFunc(Keyboard);
这是方法。
void Keyboard(unsigned char key, int x, int y) {
if (key == 27) {
exit(0);
} else if (key == GLUT_KEY_DOWN) {
drawing = 1;
} else if (key == GLUT_KEY_UP) {
drawing = 2;
} else if (key == GLUT_KEY_LEFT) {
drawing = 3;
} else if (key == GLUT_KEY_RIGHT) {
drawing = 4;
}
glutPostRedisplay();
}