I made a container template class as follow:
template<typename K, typename V>
class hash_table {
public:
class iterator {
private:
list<V> list_; // Works well
list<V>::iterator it_; // Fails: Syntax-error "iterator"
list<int>::iterator it2_; // Works well
};
//....
}
Can someone tell me, what I did wrong at list<V>::iterator it_;
? Why should this be an syntax error?