I had problems with data handling in c++.
When i use read function to read from a file and show it on screen, the last record in the file appears thrice.
I use the read function in a class.
I would like to demonstrate the use of read using an example:
det.id = 100;
cout<<"sorry the file can't be opened for output";
cout<<"sorry the file can't be opened for input";
Please observe the way the file has been opened for output to copy the details from the strucutre into the file and how the details have been copied back into the file.
Is this what u require? If not please rivert back .