Possible Duplicate:
How do I iterate over cin line by line in C++?
I need to read all lines from a file:
std::ifstream file("...");
std::vector<std::string> svec(
(std::istream_iterator<std::string>(file)),
(std::istream_iterator<std::string>()),
);
but it is read as words.