fork(6) download
  1. #include <iostream>
  2. #include <string>
  3.  
  4. using namespace std;
  5.  
  6. int main(void)
  7. {
  8. string command("test –a string");
  9. size_t pos = command.find("–a");
  10. cout << "position found = " << pos << endl;
  11. return 0;
  12. }
Success #stdin #stdout 0s 3428KB
stdin
Standard input is empty
stdout
position found = 5