Ok, in the file, % precedes a command, say insert, end, print, etc, to be done on a linked list.
Here is what I did, but it's not working. Builds fine, but has error that doesn't allow it to run (force closes), not like endless loop. I simplified the file being read to get this working and at the moment it's just:
Code:
%INSERT
MARK 129
DAVID 205
JOHN 440
%PRINT
So, when operational, it adds MARK, DAVID, and JOHN to the linked list with their respective ID.
Code:
if (strcmp(Next, "%INSERT")==0) {
while (infile.peek() != '%') {
getline(infile, line);
stringstream ss(line);
if ((ss >> name1 >> ID >> ws) && ss.eof()) {
strcpy_s(Name, name1.c_str());
list.add_entry(Name, ID);
}//if
}//while
}//if