Defining vector size

I cannot work out how I can create a vector such, that the user has to enter the length of that vector...

Thanks for helping!
Ask the size from a user, store it in variable n and then do vector <whatEverTypeYouNeed> yourVectorName(n);
Topic archived. No new replies allowed.