C++ map: expected initializer before ‘<’ token

ccompiler-errorsmap

I'm getting this error in a header file:

error: expected initializer before ‘<’ token

class MyEntity;
typedef std::map<uint16,MyEntity*> myList_t;

I figured it's not seeing the map include, but at the top of that header file is:

#include <list>
#include <map>

In another header file:

typedef unsigned int               uint32;

Any ideas?

g++ (GCC) 4.1.2 20080704 (Red Hat 4.1.2-48)

Best Answer

There was a macro named map that was causing a conflict.

Related Topic