Mine
public text v1 · immutablestd::vector<std::string> tVec;
std::string line;
std::ifstream IFile(FileName.c_str());
if(IFile.is_open())
{
while(!IFile.eof())
{
std::getline(IFile, line);
std::string::size_type loc = line.find(" ");
while(loc != std::string::npos)
{
tVec.push_back(line.substr(0, loc));
line.erase(0, loc + 1);
loc = line.find(" ");
}
}
IFile.close();
}
else
std::cout << "Unable to open file";