Mega Code Archive

 
Categories / C++ Tutorial / String
 

Find the first occurance

#include <iostream>     #include <string>     using namespace std;          int main()  {        string s1 = "this is a test";        int n;             n = s1.find_first_of("is");        cout << n << endl;             return 0;     }