Jump to content
  • Advertisement

Archived

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

darkcoder8

11 errors

This topic is 5638 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

VC++ keeps giving me 11 errors for some reason. Here they are: Font.cpp The purpose of this code is to make a class out of Nehe''s First Font tutorial: Lesson 13: Bitmap Fonts. 1)error C2144: syntax error : missing '';'' before type ''void'' 2)error C2501: ''WINGDIAPI'' : missing storage-class or type specifiers 3)fatal error C1004: unexpected end of file found Main.cpp 4)syntax error : missing '';'' before ''*'' 5)error C2501: ''g_font'' : missing storage-class or type specifiers 6)error C2227: left of ''->BuildFont'' must point to class/struct/union 7)error C2065: ''cnt1'' : undeclared identifier 8)fatal error C1903: unable to recover from previous error(s); stopping compilation NeHeGL.cpp 9)syntax error : missing '';'' before identifier ''g_isProgramLooping'' 10)''BOOL'' : redefinition; typedef cannot be overloaded with any other symbol 11)fatal error C1004: unexpected end of file found The first 3 errors point to gl.h. The 5th and 6th errors point to:
CFont*		g_font;
 
The 7th error points to:
g_font->BuildFont(-24,0,0,0,FW_BOLD,FALSE,FALSE,FALSE,			          ANSI_CHARSET,	OUT_TT_PRECIS,                   		  CLIP_DEFAULT_PRECIS,	CLIP_DEFAULT_PRECIS, 			  ANTIALIASED_QUALITY,FF_DONTCARE|DEFAULT_PITCH,		  "Courier New");
 
The 8th and 9th errors points to:
glColor3f(1.0f*float(cos(cnt1)),1.0f*float(sin(cnt2)),1.0f-0.5f*float(cos(cnt1+cnt2)));
 
The last error (the BOOL error) points to:
static BOOL g_isProgramLooping;	
 
If you need any of the other code plez ask. Thanks in advance

Share this post


Link to post
Share on other sites
Advertisement
code?

BattleGuard



Only questions raise questions. Questions are raised by people, by curiousity, the gift of nature to all human beings. And curiosity is satisfied by answers, which in turn raise questions, which lead to answers. And this curiosity is what keeps SCIENCE alive...

Share this post


Link to post
Share on other sites
The full code can be found here: (thx to Error404)
http://rafb.net/paste/results/mk312489.html

The rest of the code is NeheGL.cpp|h which can be found on NeHe''s site:
http://www.nehe.gamedev.net



What person?
I forgot what I was gonna say.

Share this post


Link to post
Share on other sites
Thx but when i do that it changes teh redefined bool to redefinition of GLVOID and gives me 12 errors instead of 11...

What person?
I forgot what I was gonna say.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
You made a very common error. You forgot to put a semicolon at the end of the class declaration.

class CFont
{
....
};

This causes a whole mumbo-jumbo of weird errors, that usually are non-errors but just problems arising from the missing semicolon.

I make this error all the time, but the shitload of errors usually indicates that this is the problem.

MindRazor

Share this post


Link to post
Share on other sites
OK i fixed the thing where it i was doing CFont::GLvoid and i also put that semicolon there. I had brough tit down to 11 errors with the GLvoid thing but with the semicolon there are now 18 errors which are lsited here:

http://rafb.net/paste/results/Y2357840.html

Thanks for all ure help so far.

Share this post


Link to post
Share on other sites
Seems like you need to include some header with some random global variables, include all headers in your project and it might work ^_ ^

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!