Click to See Complete Forum and Search --> : Error Message


GraemeW
April 17th, 2003, 10:24 AM
Hi All,

I have to write a program with multiple classes in. I have designed the program's classes etc but no matter what I do I can't get past a problem thats causing me to pull my hair out.

I have reduced my program to only one class for testing but it still fails with the following:

[C++ Error] _config.h(488): E2141 Declaration syntax error

The compiler (Borland C++ Builder 6) then opens a file called
_config.h

And highlights the line
namespace std { }

If anyone can shed any light on this I would be extremely grateful, until I can get past this error message I can't properly start coding.

PaulWendt
April 17th, 2003, 11:49 AM
This sounds like a problem specific to your compiler. However, I
doubt they would ship something that would cause no programs
to compile ... so I suspect that it's a combination of what you're
doing combined with what they have. WHy don't you post your
class? Better yet, keep making your class smaller and smaller
until the problem goes away. In this manner, you can find out
which line in particular is causing the problem ... and you might
just solve your own problem.

Of course, the problem could possibly be that the compiler
wasn't installed properly or some setting was changed or
something like that. You may want to search around on google.

--Paul

GraemeW
April 18th, 2003, 04:10 AM
I have removed nearly all of my class. It now only has a private variable and a single operation yet the error still arises.

Has no-one come accross this before?

PaulWendt
April 18th, 2003, 07:25 AM
What happens when you remove both of those? After you
remove those, remove all of your #include's. It could be an
#include that you're doing without having something #define'd.
It sounds more and more like it's a problem specific to your
particular compiler [which I, for one, have never used].

--Paul