I am stuck on a small portion of this stupid assignment. I dont need exact answers, just guidance.
The file that I need to open has multiple lines consisting of a character, and a name. The character determines what I do with that name, ex. a = add that string, R = remove the string, f = find the string. I am fairly new to this and cannot figure it out.
no code relevant to this issue has been written.
getline doesn't accomplish what i need.
pick something, and do it.
for example, try reading the file, sounds like you already started that.
what is not working with getline? getline will get the line, whether its one character or a full name or the entire world book encyclopedia.
if you getline and look at the first letter, IF the file is correct, it will be the 1 char.
getline again and you have the name.
try just reading that and printing 'got this action code with this name' and verify it against the file's contents, did you get the last record, etc? If that all works, then you can start the list part.
hint:
a linked list requires a pointer to yourself
class llist
{
llist *next; // a pointer to the same type.
}