fork download
  1. #include <iostream>
  2. #include <string>
  3.  
  4. int main(int argc, char *argv[])
  5. {
  6. const std::string line("I am a test, string");
  7. const std::string::size_type pos = line.find_first_of(",");
  8. std::cout << pos << " is " << line[pos] << "\n";
  9. return 0;
  10. }
Success #stdin #stdout 0s 15232KB
stdin
Standard input is empty
stdout
11 is ,