GLProgramming.com

home :: about :: development guides :: irc :: forums :: search :: paste :: links :: contribute :: code dump

-> Click here to learn how to get live help <-


New Paste :: Recent Pastes:: No Line Numbers


string reading by Merlin
1
 
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);
        }
    } 
}