#include "pch.h"
#include <iostream>
#include <iterator>
#include <string>
#include <vector>
#include <sstream>

using namespace std;

int main()
{
	
	string something;

	getline(cin, something);

	cout << "saved string: " << something;

	istringstream iss(something);
	
	vector<string> results(istream_iterator<string>{iss}, istream_iterator<string>());

	cout << "results size: " << results.size() << '\n';

	for (int i = 0; i < results.size(); i++) {
		cout << results.at(i);
	}

	return 0;
}
Categories: c/c++

0 Comments

Leave a Reply

Your email address will not be published.