Как из строки вывести слова в массив?
Пожалуйста, пользуйтесь www.boost.org/doc/libs/1_60_0/doc/html/string_algo...#include <iostream>
#include <vector>
#include <boost/algorithm/string/join.hpp>
#include <boost/algorithm/string/split.hpp>
#include <boost/algorithm/string/classification.hpp>
#include <boost/range/adaptor/transformed.hpp>

int main() {

    const std::string input_string = "Hello world! String  with    spaces.";

    std::vector<std::string> words;
    boost::split(words, input_string, boost::algorithm::is_any_of(" "), boost::algorithm::token_compress_on);

    std::cout << "{"
              << boost::algorithm::join(words | boost::adaptors::transformed([](auto &s){return "\"" + s + "\"";}), ", ")
              << "}"
              << std::endl;
    return 0;
}
Пожалуйста, пользуйтесь www.boost.org/doc/libs/1_60_0/doc/html/string_algo...#include <iostream>
#include <vector>
#include <boost/algorithm/string/join.hpp>
#include <boost/algorithm/string/split.hpp>
#include <boost/algorithm/string/classification.hpp>
#include <boost/range/adaptor/transformed.hpp>

int main() {

    const std::string input_string = "Hello world! String  with    spaces.";

    std::vector<std::string> words;
    boost::split(words, input_string, boost::algorithm::is_any_of(" "), boost::algorithm::token_compress_on);

    std::cout << "{"
              << boost::algorithm::join(words | boost::adaptors::transformed([](auto &s){return "\"" + s + "\"";}), ", ")
              << "}"
              << std::endl;
    return 0;
}