Get input for array of unknown length/size in c++
#include<iostream>
#include<sstream>
using namespace std;
int main()
{
string s;
getline(cin, s);
int data
istringstream iss(s);
while(iss>>data)
cout<<data<<" ";
return 0;
}