text: #include <iostream>
  #include <string>
  #include <vector>
  #include "strutils.h"
  using namespace std;
  
  
  int main()
  {
      string source, search, input, sentence;
      vector<string> words, indexes;
      int count = 0;
      
      cout << "Enter source string: "; cin >> input;
      sentence += input + " ";
      words.push_back(input);
      while (input != "END")
      {   
          cin >> input;
          sentence += input + " ";
          words.push_back(input);
      }
      sentence = sentence.substr(0, sentence.length()-4);
      words.pop_back();
      while (true)
      {
      cout << "Enter search string: "; cin >> search;
      search = search.substr(0, search.find("..")) + search.substr(0, search.find(".."));
  
      for (int k = search.length()/2; k < sentence.length(); k++)
      {
          if(sentence.substr(k, search.length()) == search)
          {
              indexes.push_back(tostring(k) + " ");
          }
      }
  
      for (int i = 0; i < words.size(); i++)
      {
          if (words[i].find(search) != string::npos)
          {
              cout << "index: " << indexes[count] << "word: " << words[i] << endl;;
              count++;
          }
      }
      }
      return 0;
  }