# c2143 in "yvals.h" ??

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

## Recommended Posts

ok so i'm happily coding away...everything is working.. i realise i can make the individual sections of the program (ie: input,graphics etc) seperate. now i have coded this way from the beginning so they are seperate anyway,its more that i realise i can put all the initialisation for them in the respective classes so i do this for the input section (which is using directinput) and bam!..compiler error c2143 in "yvals.h" i have never seen it before and have no idea what is even wrong, let alone how to fix it i looked up yvals.h and as far as i can tell it is a settings file for either VS or the compiler(if they are indeed seperate things) the full error is as follows :
Error	1	error C2143: syntax error : missing ';' before 'namespace'	c:\program files\microsoft visual studio 8\vc\include\yvals.h	480


the code i have is too big to post in its entirety(i think) any hints as to what is wrong or what i've done to break it would be very appreciated also if you need more info just ask and i'll try to post the specific bits of code related Thank you

##### Share on other sites
Make sure you are not missing a semicolon at the end of any of your class definitions.

##### Share on other sites
Quote:
 Original post by Driv3MeFarMake sure you are not missing a semicolon at the end of any of your class definitions.

Yep. It's not the problem in yyvals.h, but in one of the files included by that file (written by you), or one that is included somewhere else.

C++ compilers can be really annoying with this particular error message, one took me an hour to find simply due to a stupid syntax error in method definition.

##### Share on other sites

now i feel a little stupid

usually when i do that(and it happens) i get a different error

thanks for the help, i think that requires a +Rep for you good sir

:)

Edit: *Sirs

• 38
• 12
• 10
• 10
• 9
• ### Forum Statistics

• Total Topics
631365
• Total Posts
2999583
×