fork download
  1. #include <cctype>
  2. #include <algorithm>
  3. #include <string>
  4. #include <iostream>
  5.  
  6. int main()
  7. {
  8. std::string root_line = "hello";
  9. auto ind = std::distance(root_line.begin(), std::find_if(root_line.begin(), root_line.end(), static_cast<int(*)(int)>(std::isgraph)));
  10. std::cout << ind;
  11. }
  12.  
Success #stdin #stdout 0s 3456KB
stdin
Standard input is empty
stdout
Standard output is empty