我在头文件中收到此错误:
error: expected initializer before ‘<’ token
class MyEntity;
typedef std::map<uint16,MyEntity*> myList_t;
我认为它没有看到 map 包含,但该头文件的顶部是:
#include <list>
#include <map>
在另一个头文件中:
typedef unsigned int uint32;
有任何想法吗?
g++(GCC)4.1.2 20080704(Red Hat 4.1.2-48)
最佳答案
有一个名为map的宏正在引起冲突。
关于c++ - C++ map : expected initializer before ‘<’ token,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6558697/