Hello, I want to know the positions of the "_" in a string:
string str("BLA_BLABLA_BLA.txt");
Something like:
string::iterator it;
for ( it=str.begin() ; it < str.end(); it++ ){
if (*it == "_") //this goes wrong: pointer and integer comparison
{
pos(1) = it;
}
cout << *it << endl;
}
Thanks, André