stl::map assert [closed]

The following method definition

ListofName  GetList(){ &m_List;}

is simply wrong ! Replace it with

ListofName&  GetList(){ return m_List;}

And use it as a reference to an object and not a pointer to an object, meaning use “.” instead of “->”

 for( ListofName:: iterator itrList = GetList().begin(); 
              itrList != GetList().end();
              itrList++)

I suggest you read a bit more about c++ fundamentals.

Leave a Comment