📅  最后修改于: 2022-03-11 14:44:45.731000             🧑  作者: Mango
#include
#include
using namespace std;
int main()
{
ifstream file;
string inputString;
vector data;
file.open("/path/to/file");
while(file>>inputString) //reads one string at a time
data.push_back(inputString); //add it to data vector
file.close();
}