Answer by john for C++, Find out if a string contains a substring?
There are a few bugs and issues in this code I think, but the biggest is the for loops all go too far by one.for (i = 0; i <= Words.length(); i++)andfor (j = 0; j <= n; j++)should befor (i = 0; i...
View ArticleC++, Find out if a string contains a substring?
I don't know how to use the find() function to check if a string contains a substring, then the program should print out all Words, and "Contains" if Sentence contains at least one of them. Can anyone...
View Article