Public Group

# c++ compile error

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

## Recommended Posts

Hey guys just a quick one, when I go to compile a small class that is basically made up of a 2D array and a few functions for manipulating it's data, I'm given the following error: error C2143: syntax error : missing ';' before 'PCH creation point' What exactly is a 'PCH creation point'? The code in question is the line:
Square playArea[GAME_WIDTH][GAME_HEIGHT];
GAME_WIDTH and GAME_HEIGHT are both constants defined in a definition file, which has been included. Square is a class defined in another file (also included, obviously)

##### Share on other sites
C2143: syntax error : missing ';' before 'PCH creation point'

Check each of the #include files to ensure that the closing brace of each class declaration is followed by a semicolon.

##### Share on other sites
PCH stands for precompiled header. It is a way of reducing compile times by caching header files that don't change regularly. My personal experience is that they tend to generate mostly problems. You can disable them via the project settings. Boy there have been some weird errors fixed by disabling PCH...

Greetz,

Illco

##### Share on other sites
Ah thats it. . thanks!

You'd think they could come up with a less cryptic name for it. . or at least spell out PCH ..

1. 1
Rutin
26
2. 2
3. 3
4. 4
5. 5

• 11
• 9
• 9
• 9
• 14
• ### Forum Statistics

• Total Topics
633312
• Total Posts
3011309
• ### Who's Online (See full list)

There are no registered users currently online

×