Suppose I have a string and I want to find whether a specific character (like \'|\') is present or not, what is the best and fastest technique to do so? I know string find i
You can try this:
string s1 = "Hello"; string s2 = "el"; if(strstr(s1.c_str(),s2.c_str())) { cout << " S1 Contains S2"; }