#include <string> #include <iostream> int main( ) { std::string s = "Search from the beginning"; std::cout << s.find("ar") << '\n'; // Search from the beginning } /* 2 */