-
Build Errors
Does anyone know why i am getting this error
c:\documents and settings\hp_administrator\my documents\visual studio 2005\projects\beta1\beta1\mainfile.cpp(60) : fatal error C1075: end of file found before the left brace '{' at 'c:\documents and settings\hp_administrator\my documents\visual studio 2005\projects\beta1\beta1\mainfile.cpp(17)' was matched
thanks
-
Cant you read?
numbers of left and right braces dont match.
-
Basically, it could not find the closing brace to an opening brace. A possible reason is that you forgot to close your main() function's opening brace. Indenting your code properly will help prevent this kind of problem in the future.
-
-
Always type them in in pairs (ditto for (), "" and /**/), then move the cursor to insert the content you want.
It's a couple of extra key presses, but at least you'll never be in the situation of playing find the matching position and insert.
Plus it makes your code more amenable to incremental compilation to check that what you're writing will at least compile.
-
Also be careful when putting a #ifdef BLAH around a block of code. The #endif has to be in the right place, with respect to the number of curly brackets