writing/reading a Structure to/from a file
I need to store an object of File class into a file for further use.
I need something like reading and writing of structures into a binary file in C/C++.
Could you please help me and tell me how to do this?
I need to do this because my program has a text input file and every time it starts ,it should check whether it is exactly the previous file it read from and if so reading remaining of the file, but if not it should start from the beginning of the file. I decided to use File.equal() method but I don't know how to store the File object .
Do you think my method would meet my need? If not, what's the solution?