Jump to content
  • Advertisement
Sign in to follow this  
wraith811

Issues with header files

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

I've tried to put together this text based game and I'm having trouble trying to get it to work. Every time I try to use a weapon.h the game will not compile; however, when I comment it out the game works fine. I just can't use weapons as objects. Here is the output build at pastebin.com: http://pastebin.com/Dw3kQMwc The complete game is at pastebin.com as well here: http://pastebin.com/UfkKJ8FT Thanks, let me know what you think.

Share this post


Link to post
Share on other sites
Advertisement
Okay, this looks like a problem with how you have included the files, but also some syntax and other things.

You can read this: http://www.gamedev.net/reference/articles/article1798.asp, and also check the lines that the semi-colon error messages refer to.

Share this post


Link to post
Share on other sites
I kind of understand the article but how come depending where I move the weapon.h file inside the library.h file I get different errors. To me that would signal that their is some kind of dependency issues. What I don't get is that it's a header file so it shouldn't be dependent upon any other file except the file that explains its parent class. Still confused and unsure what to do.

Share this post


Link to post
Share on other sites
Well, its official, I'm a moron! For some reason I decided to check the weapon.h file and realized that I was missing a semi-colon at the end of the class definition. Thanks man for pointing me in the right direction. Its amazing what the brain can do and can't do sometimes :)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!