Erase characters in std::string
All i'm trying to do is erase the first occurance of a character in a std::string.
str::erase(iterator) takes an iterator as an argument, but std::find() returns size_type.
This is the best i can come up with.
There's has got to be an easier way right?
int main(int argc, char *argv)
string str = "seller";
char c = 'l';
pos = str.begin();
//seek first occurence
while(pos != str.end() && *pos !=
//erase first occurence
cout << str << endl;