"fffff" is a string in itself, so you'd have to make sure that 6 consecutive chars of the string are not equal to f. One way to do this would be to see if a char is 'f', and if it is, check the next one for 'f'. Keep doing this until you either don't find an 'f', or find six:
1 2 3 4 5 6 7 8 9
for(unsigned i = 0; i < string.size(); ++i)
{
if(string[i] == 'f')
{
int count = 0;
while(string[++i] == 'f'&&count < 6){count++;}
if(count == 6){IGNORE();}
}
}
There is a bit of trouble with that test you have there. When you enter the inner while loop, you stop comparing against the size of the string and so are free to run outside its bounds.
I'd just add one to count if you find an 'f', and reset it to 0 if you find anything else.