无法从“void (__thiscall CmazeView::* )(HDC)”转换为“void (__cdecl *)(HDC)”怎么办? 100
void(*idlefunc)(HDChDC);voidCmazeView::spinmaze(HDChDC){//绕两个坐标旋转迷宫图staticfloatspin=7...
void (*idlefunc)(HDC hDC);
void CmazeView::spinmaze(HDC hDC)
{
//绕两个坐标旋转迷宫图
static float spin = 720.0f;
spin -= 5.0f;
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glLoadIdentity();
glPushMatrix();
glTranslatef(0.0f, 0.0f, -20.0f);
glRotatef(spin, 0.0f, 1.0f, 1.0f);
glTranslatef(-MAZE_WIDTH / 2.0f, -MAZE_HEIGHT / 2.0f, 0.0f);
//调用两个显示列表,绘制迷宫顶部和侧面
glCallList(walllist);
glCallList(mazelist);
glPopMatrix();
SwapBuffers(hDC);
if (spin <= 0.0f)
{
spin = 720.0f;
idlefunc = &CmazeView::entermaze;
player_x = STARTING_POINT_X;
player_y = STARTING_POINT_Y;
player_h = STARTING_HEADING;
}
}
错误 4 error C2440: “=”: 无法从“void (__thiscall CmazeView::* )(HDC)”转换为“void (__cdecl *)(HDC)”
怎么办,初学者不太懂,按照pdf上做的,用的是VS2013
外加这个idlefunc的作用是什么 展开
void CmazeView::spinmaze(HDC hDC)
{
//绕两个坐标旋转迷宫图
static float spin = 720.0f;
spin -= 5.0f;
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glLoadIdentity();
glPushMatrix();
glTranslatef(0.0f, 0.0f, -20.0f);
glRotatef(spin, 0.0f, 1.0f, 1.0f);
glTranslatef(-MAZE_WIDTH / 2.0f, -MAZE_HEIGHT / 2.0f, 0.0f);
//调用两个显示列表,绘制迷宫顶部和侧面
glCallList(walllist);
glCallList(mazelist);
glPopMatrix();
SwapBuffers(hDC);
if (spin <= 0.0f)
{
spin = 720.0f;
idlefunc = &CmazeView::entermaze;
player_x = STARTING_POINT_X;
player_y = STARTING_POINT_Y;
player_h = STARTING_HEADING;
}
}
错误 4 error C2440: “=”: 无法从“void (__thiscall CmazeView::* )(HDC)”转换为“void (__cdecl *)(HDC)”
怎么办,初学者不太懂,按照pdf上做的,用的是VS2013
外加这个idlefunc的作用是什么 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询