Jump to content
  • Advertisement

Archived

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

Rome

help please, few questions...

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

edit: I was meaning to copy everything above and put it into the beginners section, sorry. I have some things that I need to finally ask because I simply haven't figured them out as a beginner programmer since I started. I would really appreciate any feedback on any of the questions. Some relate to openGL. 1) I like things neat and need to add a call to my drawcube() (don't know how you call them... functions?) from the drawscene part "where all the drawing is done" but the drawcube() is in another .cpp file. I included a .h file with it inside and linked both files along with the drawcube() in drawscene, but it doesn't work. I get... error : missing ';' before type 'void' error C2501: 'WINGDIAPI' : missing storage-class or type specifiers fatal error C1004: unexpected end of file found All when double clicked go to the line WINGDIAPI void APIENTRY glAccum (GLenum op, GLfloat value); in GL.h 2) Is there any difference between blah(void) and blah() ? 3) Is there any difference between 'if(blah == 1 || blah == 2)' and 'if(blah == 1 && blah == 2)' ? 4) How do I do the above except instead of 'and' do 'or', where 'and' is || and && ? 5) Are bools default to true? 6) Will return 0; stop doing what where? As soon as the line is done or what? 7) I've read some tutorials and still don't know how to use getch(); They don't really explain it in any. 8) Is there an easy way to put color into a dos window. [edited by - Rome on January 23, 2003 6:36:52 PM]

Share this post


Link to post
Share on other sites
Advertisement
I can answer a few of those... Hope you stay motivated, you''ve got a lot coming at you

2) no, there isn''t

3) yes, that''s a big difference "||" is a logical OR, meaning that it would go into the if-part, if either the left or the right condition is TRUE. "&&" is the counterpart to OR.. it''s a logical OR. so, the example you gave would be nonsense, since blah can never be 1 AND 2 at the same time.

5.) variables aren''t initialised. to actually, you cannot say wether they''re true or false before being initialized. So, always initialize your variables

6.) everything up to and the return statement is executed. everything below return isn''t. but note, that return foo(); will execute foo() and return foo()''s return variable...

Those are the one''s that I think I have good explanations for...
hope that helped!
cya,
Phil

Visit Rarebyte!
and no!, there are NO kangaroos in Austria (I got this question a few times over in the states )

Share this post


Link to post
Share on other sites
I was hoping people wouldn''t think blah on the left and right were the same thing, let''s say ''blah1 || blah2'' and ''blah1 && blah2'' instead.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Hey,

#include <windows.h> before all of your OGL libraries and headers

Michael Bartman
[URL=http://www.darkomenstudios.com]Dark Omen Studios[/URL]

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
thats for the

error : missing '';'' before type ''void''
error C2501: ''WINGDIAPI'' : missing storage-class or type specifiers
fatal error C1004: unexpected end of file found

errors

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!