Public Group

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

## 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 on other sites
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 on other sites
Yes, Timer class does include globals.h, but i fixed that but it still doesnt work.

##### 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 on other sites
Apparently you didn't fix it, since it still doesn't work. Show some code all relevant headers.

edit: Ok, working, so ignore this.

##### Share on other sites
Read this. Even if you have it working, it is worth understanding what is going on.

1. 1
2. 2
JoeJ
20
3. 3
4. 4
frob
12
5. 5

• 13
• 18
• 13
• 20
• 13
• ### Forum Statistics

• Total Topics
632194
• Total Posts
3004681

×