I know we're not supposed to post homework here and I'm not. I'm hoping someone can clarify exactly why we've been told to do a linked list in this way. Previously when I did linked list the head was the same as every other node. However, we were told to do it differently whereas the head is a different struct (see top of code). Well, when I make a function to load a text file into this list (which is supposed to be a stack) I can't figure out how to connect the two. I don't understand how to connect two structs that don't match when I'm loading in data that populates the larger struct. See bottom half of code. I get errors on the file input part and I think it's because I'm not linking them properly.
> Previously when I did linked list the head was the same as every other node.
> However, we were told to do it differently whereas the head is a different struct (see top of code).
In the code that you've posted, the `head' is a pointer to `vehicleDataNode', as it would be any other link of the nodes in your list.
I don't understand why are you saying that the head is a different struct.
> I get errors on the file input part and I think it's because I'm not linking them properly.
If you get error messages, post the error messages.
Also, make sure that your testcase is selfcontained http://www.eelis.net/iso-c++/testcase.xhtml