#include <iostream> #include <string> using namespace std; int main() { string fullName; string name; string::size_type startPos; fullName = "Full name"; startPos = fullName.find("name"); name = "Mr. " + fullName.substr(startPos, 8); cout << name << endl; return 0; }