Phone book function....malfunctioning...

I have created this program for my school project. The full program is not complete but still the function that is supposed to display the details stored in the data file is not working properly. The function is printing the last entry twice. I want to print it only once...

Here is the pastebin link to my code...http://pastebin.com/LarwkdcL

Also please fell free to suggest any other changes....

Thank You
while(!filout.eof()) Never ever loop on eof() unless you know its behavior and you really need it.
Loop on input operations:
1
2
while(filout.read((char*)&contact,sizeof(contact)))
    contact.show_full_info();

Thank you ...really helpfull..
Topic archived. No new replies allowed.