input string with space

How to input string with space in vector container?
I know this already but my question was:
Suppose I have a vector object with unknown number of elements and I have 10 sentences to input by using the push_back function for vectors. Then how do I do This.
If you already know vector and getline() and also push_back() what else do you need to know? The question is not very clear as to what is the actual difficulty.
Sorry I think I am not asking correctly.
Let me ask you this.
How do I enter below 2 sentences in a vector.

It is cold today.
Winter is about to start.

Thanks.
I found the answer for string input in vector container.
Actually I need to declare a string variable say for instance:
string description;

Then I can read a line from a text file using getline as under:
getline(infile, description);

After than I can push_back() into vector as under:
itemDesc.push_back(description);

Thanks.
Topic archived. No new replies allowed.