【发布时间】:2013-04-21 13:50:47
【问题描述】:
template <class Item>
class bag
{
public:
//TYPEDEF
typedef size_t size_type;
typedef Item value_type;
...
}
当我使用时
template<class Item>
bag<Item>::size_type bag<Item>::count(const Item& target) const
VC++ 报错为 Source.cpp(207): 警告 C4346: 'bag::size_type' : 从属名称不是类型
谁能告诉我为什么?谢谢!
【问题讨论】:
标签: c++