fork(11) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. string str ("abcdefghijklmnoabcde");
  6. string str2 ("abcde");
  7.  
  8. size_t found = str.find(str2);
  9.  
  10. if(found == 0)
  11. {
  12. cout << "found";
  13. }
  14.  
  15. return 0;
  16. }
Success #stdin #stdout 0s 3472KB
stdin
Standard input is empty
stdout
found