- Nov 6, 2004
- 324
- 0
- 0
So I'm working on this damnable MFC program for a class using Visual C++. I'm just about done, and hit build solution for hopefully the last time. Imagine my surprise when the compiler error isn't crabbing about one of my own errors, but rather pops out syntax error C2143: missing ';' before 'namespace' This is apparently in 'yvals.h' on line 528, and is part of Visual Studio. I dutifully click on the error and here is the code in question:
If you go to the definition of _STD_BEGIN, if it even matters, this is what turns up:
I included surrounding lines in case this is helpful. I did some searches on google and tried disabling precompiled headers as some recommended, still no luck. I haven't the slightest idea how to proceed, can anyone help? Previous builds of the project compiled and ran just fine. I've gone back and commented out the code I entered prior to this error occuring, but that does not seem to help either. I'm using Visual Studio 2008 Professional.
Code:
#ifdef __cplusplus
_STD_BEGIN (edit: this is line 528)
typedef bool _Bool;
If you go to the definition of _STD_BEGIN, if it even matters, this is what turns up:
Code:
#if defined(__cplusplus)
#define _STD_BEGIN namespace std {
#define _STD_END }
#define _STD ::std::
I included surrounding lines in case this is helpful. I did some searches on google and tried disabling precompiled headers as some recommended, still no luck. I haven't the slightest idea how to proceed, can anyone help? Previous builds of the project compiled and ran just fine. I've gone back and commented out the code I entered prior to this error occuring, but that does not seem to help either. I'm using Visual Studio 2008 Professional.
Last edited: