-
Why the error message?
I’ve recently started using the bloodshed dev IDE. I got an error message in one program and I couldn’t work out why, but I’m a relative beginner so I expected that. However I’ve tried to compile some code from a CD and I get a similar error message
expected unqualified-id before "namespace"
expected `,' or `;' before "namespace"
which points to one of the preprogrammed files. (\include\c++\3.4.2\bits\functexcept.h)
A similar error message has appeared but with “namespace” replaced by something else. Does anyone know why this happens? I’ve stared at it for far too long!
-
what include files are you using? The one with, or without the .h extension? should be something like this
Code:
#include <string>
#include <vector>
...
using namespace std; <<< this does not work with include that have .h extension
-
Are you compiling a C++ program as a C one (ie, it has a .c extension)?