help with iterator error

view full story

http://www.linuxquestions.org – I am getting an error relating to an iterator from a list that I dont understand. Code: std::list<shapeNode*>::iterator ii; for(ii=childs.begin();ii != childs.end(); ii++) *ii->drawAll(); where "shapeNode" is derived from "treeNode", and treeNode is Code: template<typename T> class treeNode { private: T Data; std::list<treeNode*> childs; }; and shapeNode is Code: class shapeNode : public treeNode<shape*> { }; The error I'm getting is as follows, also getting the same error for operator!= as well Code: error: no match for 'operator=' in 'ii = ((shapeNode*)this)->shapeNode::<anonymous>.treeNode<shape*>::childs. std::list<_Tp, _Alloc>::begin [with _Tp = treeNode<shape*>*, _Alloc = std::allocator<treeNode<shape*>*>]()' new at using templates, so im wondering if I have some syntax errors, the book I'm using doesn't go too indepth with templates and inheritance. (HowTos)