Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
嗨,我想创建一个带有 std::map 的 typedef,但编译器返回以下错误:“错误:模板参数的数量错误(2,应该是 4)”
代码:
typedef std::map<unsigned int, float> AcumulatorHash;
既然你没有提供完整的程序,那我就得动用我的神通了。
我的水晶球说您需要在#include <map>源代码的开头添加。
#include <map>
我有一个非常相似的错误。问题是分隔模板参数的句号而不是逗号。