|
From: Elizabeth B. <sog...@ya...> - 2002-08-23 21:42:23
|
Hi Alvin, Check out: <http://www.sgi.com/tech/stl/Map.html> According to the (definitive IMO) definition mentioned above: void erase(iterator pos) returns no value. > it=m.erase(it); // erase current item and get next item - COMPILER ERROR? There is no match: > 10 C:\projects\DevCpp\stl-test\main.cpp > no match for `_Rb_tree_iterator<pair<const int,void *>,pair<const > int,void *> &,pair<const int,void *> *> & = void' That is to say, there is no match for a void-to-iterator cast. This is the candidate: > 185 C:\Dev-Cpp-beta5\include\g++-3\stl_tree.h > candidates are: struct _Rb_tree_iterator<pair<const int,void > *>,pair<const int,void *> &,pair<const int,void *> *> & > _Rb_tree_iterator<pair<const int,void *>,pair<const int,void *> > &,pair<const int,void *> *>::operator =(const > _Rb_tree_iterator<pair<const int,void *>,pair<const int,void *> > &,pair<const int,void *> *> &) Elizabeth |