I want to know how I can accept multiple numbers on one line without exactly knowing in advance how many.
So for example if I have 1 2 3 4 as input I could
1 2 3 4
Put it inside a loop:
int x; while ( cin>>x ) vec.push_back(x);