How To Make An Array Based On User Input

I need my array or a vector that will be the size the user wants it to be. I also need syntax and stuff like that Thank You
There's this awesome website I found(don't know if you are aware of it) but you can just type in a question and with a little bit of reading usually find an explanation/answer.

It's called google.

It's crazy how useful it is!
lol ok :D
i got that but whats the syntax like i need x amount of variables then i need the user to write the variables how?
1
2
3
4
vector<int> x;
cin >> x;
cin >> x[0];
cin >> x[1]

????
1
2
3
4
5
6
7
std::vector<int> v ;

std::cout << "Enter some numbers: " ;

int input ;
while ( std::cin >> input )
     v.push_back(input) ;
thanks!
Topic archived. No new replies allowed.