#include <iostream>#include <vector>#include <boost/algorithm/string.hpp>using namespace std;class FindVowelWords{ vector<string> input; // тут будут лежать слова для обработки vector<string> output; // тут будут лежать обработанные слова vector<char> vowels; // а тут глассные буквыpublic: // ... FindVowelWords(const string& inputStr){ vowels = {'a', 'A', 'o', 'O', 'i', 'I', 'u', 'U', 'e', 'E'}; // определяем вектор с гласнымы boost::split(input, inputStr, [](char c){return c == ' ';}); // разбиваем воходную строку на слова } // поиск слов, которые начинаются с гласных void handle(){ for(auto const& word : input){ // проходимся по всем словам for(auto const& vowel : vowels){ // проходимся по всем гласным if(word.at(0) == vowel){ output.push_back(word); // если первая буква слова - гласная, то заносим слово в результирующий вектор } } } } // вывод результата void printOutput() const{ for(auto const& item : output){ cout << item << endl; } } // вывод входных данных void printInput(){ for(auto const& item : input){ cout << item << ' '; } } int getOutputSize(){ return output.size(); }};int main(){ string test = "Don't be arfraid, just try to understand this code and you'll be a good programmer!"; FindVowelWords findIt(test); cout << "You have entered this string: " << endl; findIt.printInput(); cout << endl << endl; findIt.handle(); cout << "Words that begin with a vowel: " << endl; findIt.printOutput(); cout << endl; cout << "number of words have been found: " << findIt.getOutputSize() << endl; return 0;}