// substring and find
string str="We think in generalities, but we live in details.";
string str2 = str.substr (3,5); // "think"
size_t pos = str.find("live"); // position of "live" in str
string str3 = str.substr (pos); // get from "live" to the end
cout << str2 << ' ' << str3 << '\n'; // get "think live in details."
string// substring and findstring str=&quot;We think in generalities, but we live in details.&quot;;string str2 = str.substr (3,5); // &quot;think&quot;size_t pos = str.find(&quot;live&quot;); // position of