I can't seem to declare a map in certain places:
is fine at the top of main(), but I get one of two kinds of error when I use it in an included file:Code:map<string,int> testdata;
error: ISO C++ forbids declaration of ‘map’ with no type
I tried adding spaces inside the angle brackets, same thing. The other error is:
error: expected primary-expression before ‘,’ token
error: expected primary-expression before ‘>’ token
which is what I would get if I failed to #include<map>, except then I would also get "error: ‘map’ was not declared in this scope". Everything is within scope of using namespace std.
Anyone seen this before? I'm using gcc 4.3.2. I thot maybe I had a bracket missing somewhere, but it compiles and runs fine...just I can't use a map