I am trying to create a parser class that will parse a file based on " " and place the words into a linked list.
class FileReader { public: FileReader(char* file) { ifstream fout (file, ifstream::in); string hold; while (fout.good()) { getline (fout, hold, " "); cout << hold; } fout.close(); } }; The function getline(fout, hold, " ") is not recognizing " " as the delimiter.
I have not coded the linked list part as of yet so this is just the parsing part of the program.
Also would there be a better way to create a parser?