现在的位置: 首页 > 综合 > 正文

error C2955: ‘std::list’ : use of class template requires template argument list

2013年08月18日 ⁄ 综合 ⁄ 共 249字 ⁄ 字号 评论关闭

I encountered a similar error when I named a parameter "list", where the compiler tried to parse "list" as std::list<T>. Renaming "vector<myClass> list" to "vector<myClass> myList" worked smashingly.

在我把一个参数命名为"list"时,碰到相似的错误。因为编译器会试图将“list”解析成“std::list<T>”。改变参数名称可以很好地解决这个问题。

抱歉!评论已关闭.