CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: Error Message

  1. #1
    Join Date
    Apr 2003
    Posts
    64

    Error Message

    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.

  2. #2
    Join Date
    May 2000
    Location
    Phoenix, AZ [USA]
    Posts
    1,347
    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

  3. #3
    Join Date
    Apr 2003
    Posts
    64
    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?

  4. #4
    Join Date
    May 2000
    Location
    Phoenix, AZ [USA]
    Posts
    1,347
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured