hList doesn't contain an iterator type. How do you expect to declare a variable of that type?

If you want list's iterator, you need to know that the type is "dependent" - it could depend on the template parameter whether it's a type or an object. Thus, you need the typename keyword to disambiguate:
Code:
typename list<T>::iterator it;