Search for a character in a string

How could I search for a character in a string and return true or false?

Cheers,
George
Click on documentation in the little box on the upper-left side of the page, then Strings Library, then string and look at the "find" functions.
Try the following:
Iterate through the string using a loop and if(string[i]=='?')break;
if (string[i]=='?')cout<<"the character was number "<<i<<endl;
Topic archived. No new replies allowed.