Re: School file i/o program
I have been trying to work on it but I am completely lost now.
Re: School file i/o program
Some info http://www.parashift.com/c++-faq-lit...alization.html
What specific part of the task are you having a problem with? Does the current code write any, some or all necessary infomation to a file? You currently have a Students::Save method, you probably need a Students::Restore method that does the opposite of save (open file, parse content into StudentNodes and nodes).
I would recommend not using goto statments in C++ code.
Re: School file i/o program
I suggest that you create a simpler project first and practice with simple text files. Just practice writing and reading an array of strings and / or numbers to and from a text file until you get the hang of it. Search the forums for threads related to files and start reading and looking for examples.
Another place to look is here. Start clicking on the member functions and read some of the examples. If you happen to have a book on streams, read it. If you have never done this before it is going to require some research to get it right.
http://cplusplus.com/reference/iostream/fstream/
If you have used other streams before, learning filestreams shouldn't be too hard. They are generic classes. stringstreams and filestreams inherit from the same base classes used for handling stdin and stdout. You just have to study the member functions and capabilities specific to the filestream, ifilestream, and ofilestream classes.