2 strings, the second one has to be a substring of the first



if (str == str2)

else if (str != str2)

string str2 = str.substr ();http://www.cplusplus.com/forum/general/
Last edited on
To find a substring you need to use the find function of the string.
http://www.cplusplus.com/reference/string/string/find/
Topic archived. No new replies allowed.