PDA

View Full Version : help!first GL program(compile error)



rage7826
07-20-2002, 05:42 PM
alright, i just started programming in OpenGL, so got the book and everything. I try to compile the program and it gives me this:

c:\program files\microsoft visual studio\myprojects\opengl test\openglllltest\bob].cpp(73) : error C2601: 'DrawTorso' : local function definitions are illegal

'DrawTorso' is the name of the function

i run Visual C++ under XPpro so HELP, PLEASE! thank you

quangkid
07-20-2002, 06:16 PM
Send your source code for me, I will find error from your program.
quangkid@hcm.fpt.vn

Originally posted by rage7826:
alright, i just started programming in OpenGL, so got the book and everything. I try to compile the program and it gives me this:

c:\program files\microsoft visual studio\myprojects\opengl test\openglllltest\bob].cpp(73) : error C2601: 'DrawTorso' : local function definitions are illegal

'DrawTorso' is the name of the function

i run Visual C++ under XPpro so HELP, PLEASE! thank you

Deiussum
07-20-2002, 06:45 PM
I'm guessing that you are not only new to OpenGL, but also fairly new to C++. If you aren't new, that error would tell you that you are trying to create a function inside another function, which is not possible in C++.

Double check that you have your brackets all in place correctly. It's possible that whatever function is before DrawTorso is missing an ending bracket.

Latrans
07-20-2002, 06:51 PM
Put down the compiler, and STEP AWAY before someone gets hurt!