#include <iostream>#include <vector>#include <boost/algorithm/string.hpp>using namespace std;void reverseWords(string& inputStr, vector<string>& output){ vector<string> input; boost::split(input, inputStr, [](char c){return c == ' ';}); for(auto& word : input){ reverse(word.begin(), word.end()); output.push_back(word); }}int main(){ string inputStr; vector<string> output; cout << "enter some string: " << endl; getline(cin, inputStr); cout << endl; reverseWords(inputStr, output); cout << "result: " << endl; for(auto const& word : output){ cout << word << ' '; } cout << endl; return 0;}