回 帖 发 新 帖 刷新版面

主题:用OpenGL编程,调试时出现的错误

我在VC++上用OpenGL编了段程序,调试结果,提示错误如下:
Lesson1.cpp
E:\文本学习资料\opengl资料\新建文件夹\lesson01\Lesson01\Lesson1.cpp(140) : error C2084: function 'int __cdecl InitGL(void)' already has a body
E:\文本学习资料\opengl资料\新建文件夹\lesson01\Lesson01\Lesson1.cpp(404) : error C2171: '!' : illegal on operands of type 'int (void)'
执行 cl.exe 时出错.
请高手给解决一下。在此表示感谢! 

回复列表 (共1个回复)

沙发

\lesson01\Lesson01\Lesson1.cpp(140) : error C2084: function 'int __cdecl InitGL(void)' already has a body

 InitGL(void)函数重定义,之前以前有了一个 InitGL(void)函数


\lesson01\Lesson01\Lesson1.cpp(404) : error C2171: '!' : illegal on operands of type 'int (void)'
执行 cl.exe 时出错.

 没看到代码,估计是表达式出错

我来回复

您尚未登录,请登录后再回复。点此登录或注册