#include #include using namespace std; int main() { string word; string other; // String to search for. string search="hi"; // Location of "hi"; int pos; // Amount of characters to read for substring. int amount; word="sushi"; pos=word.find(search,0); amount=search.length(); if(pos!=string::npos) other=word.substr(pos,amount); cout << "Found: " << other << endl; }