Original Post
list<string> lst;
lst.push_back("hello");
lst.push_back("hello");
lst.push_back("hello");
lst.push_back("hello");
list<string>::iterator iter;
for( iter=lst.begin; iter!=lst.end(); iter++)
{
(*iter).erase(); //empty the string
lst.erase(iter); //removed the node from the list
}