Initializing a vector from a text file
问题 I am attempting to write a program which can read in a text file, and store each word in it as an entry in a string type vector. I am sure that I am doing this very wrong, but it has been so long since I have tried to do this that I have forgotten how it is done. Any help is greatly appreciated. Thanks in advance. Code: #include <iostream> #include <fstream> #include <vector> #include <string> using namespace std; int main() { vector<string> input; ifstream readFile; vector<string>::iterator