Library Database management system

I am writing a library database management system using c++ in Xcode on my mac.
When i create a executable code from the source code using the command:g++ main.cpp
A a.out file is created which i think is the executable file.
When i open it, and enter the details of books or students, the data is not there the next time i open the file. Is there any way i can make sure that the data stays there permanently?
You need to show your code, you're probably doing something like deleting the file contents when you open the file.

I can't put the program here because of the character limit.
But this is the text file:
https://drive.google.com/file/d/0B8Rz9e8CGMpaT1hNTldFaGo5Skk/view?usp=sharing
Topic archived. No new replies allowed.