After searching the board I found a nifty way to remove punctuation from a string
str.erase(std::remove_if(str.begin(),str.end(),isp unct),str.end());
I've been trying to adap this to strings in a set:
but I get the following errors:Code:std::set<string>::iterator itr=Words.begin(); while(itr!=Words.end()) { *itr.erase(std::remove_if(*itr.begin(),*itr.end(),ispunct),*itr.end()); itr++; }
biblio.cpp: In function `int main()':
biblio.cpp:33: error: `begin' undeclared (first use this function)
biblio.cpp:33: error: (Each undeclared identifier is reported only once for
each function it appears in.)
biblio.cpp:33: error: `end' undeclared (first use this function)
biblio.cpp:33: error: `erase' undeclared (first use this function)
What am I doing wrong?