if (file) {
while (file >> word) {
if (isstring) { // if we are searching for a string
buf += word; // add this text on to the buffer
if (*word.end() == '"', ') { // if its the end of the string
isstring = false; // then stop searching
entvalues.push_back(buf); // and push our string on
}
}
else if (word[0] == '"', ') {
isstring = true;
buf += word;
}
else {
entvalues.push_back(word);
}
}
}