cpp program to fill the database