Cannot convert string to char. For (char s : str) что значит.