Hi, all
I got stuck by the erase function usage.
here is my code:

//A is my class
//this function is used for judge weather there is a punctuation in //the word and get rid of it.
void A::isnotpuct(const string& wordlist) const
	size_t len = wordlist.length() +1;
	for(size_t j=0; j<wordlist.length();j++)
	{  if(ispunct(wordlist[j]))
			size_t lenend = len-j;

But i got the error information:

error C2663: 'std::basic_string<_Elem,_Traits,_Ax>::erase' : 3 overloads have no legal conversion for 'this' pointer

What does that mean??
How i could correct it??
Many thanks.

>What does that mean??
erase modifies the string, but your string is const. Well, that's not what the error means, but it's the root cause. ;)