Jump to content
  • Advertisement
Sign in to follow this  
Lith

header files

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

This is some of my code in "globals.h"
extern Timer Fps;
The comiler says this: error C2146: syntax error : missing ';' before identifier 'Fps' Timer is a class, i have included the files to the class but it still wont work :(

Share this post


Link to post
Share on other sites
Advertisement
Does the timer class header file include this globals header? If so, you have cyclic inclusion of header files, preventing some headers from being properly included before they are needed.

In any way, the definition of the timer class isn't properly included before the global is declared.

Share this post


Link to post
Share on other sites
Yes, Timer class does include globals.h, but i fixed that but it still doesnt work.

Share this post


Link to post
Share on other sites
I forgot to remove the include from the header file, i only did it in the cpp file.

It worked!!
thankyou!

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!