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++ Bericht Fehler als Source.cpp (207): Warnung C4346: 'bag :: size_type': abhängiger Name ist kein Typ
Kann mir jemand zeigen, warum? Vielen Dank!
möglich Duplikat [Wo und warum muss ich die "Vorlage" setzen und "Typname" keywords ?] (http://stackoverflow.com/questions/610245/where-and-why-do-i-have-to-put-the-template-and-typename-keywords) – juanchopanza