Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


decalration error

This topic is 6067 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

static GLfloat theta[] = {0.0, 0.0, 0.0}; Why do i get error when i declare the above??? The errors are... error C2059: syntax error : ''static '' And also, i would like to know what''s the difference between float and GLfloat?? Why is that i get errors sometimes when i declare variables as GLfloat, before my main(i.e. aft i include all my header files)??? meaning, it does not take it as a variable type(i.e int, char, float) and appear in black instead of blue... Thanks....

Share this post

Link to post
Share on other sites
GLfloat is in the header

typedef float GLfloat;

so it is NO different than float.

Compiler Error C2059
syntax error : 'token'

The token caused a syntax error. Problems of this type can sometimes be attributed to a syntactical or clerical error. For example:

void main ( // No closing parenthesis.


In the preceding example, the error message will be generated for the line which contains the open curly bracket, although the true source of the error appears on the line just above. As a general rule, make sure to also examine the lines above the line listed in the error message when trying to determine the cause.


If examining the line listed in the error message yields no clue to what the problem might be, try commenting out the line and recompiling the source code. Also, sometimes commenting out several lines directly above the line listed in the error message will help narrow down the cause.

If the error message occurs on a symbol immediately following a typedef'd variable, ensure that the variable has been defined somewhere in the source code.

Edited by - Eber Kain on December 10, 2001 9:14:30 AM

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!