#include <iostream>
#include <sstream>
#include <algorithm>
#include <iterator>
#include <vector>
using namespace std;
int main()
{
size_t n = 4;
string s = "42 54 35 76";
istringstream is(s);
vector<int> v;
copy_n(istream_iterator<int>(is), n, back_inserter(v));
/*******
** vector<int> v2(n);
** copy_n(istream_iterator<int>(is), n, v.begin());
*******/
copy_n(v.begin(), n, ostream_iterator<int>(cout, " "));
}
src:url('C:/Users/Admin/Desktop/fonts/future.woff2') format('woff2')удручает(
#include<iostream>
#include<algorithm>
#include<iterator>
#include<string>
using namespace std;
string getOneStr(istream& is)
{
string result;
copy(++istreambuf_iterator<char>(is), {}, back_inserter(result));
return result;
}
int main()
{
cout << "Enter the line (Win Ctrl+Z or Lin Ctrl+D end)\n$: ";
string s = getOneStr(cin);
cout << s << endl;
}