Hi friends,
I am new to file handling and i need some help.
How can i initialize a file with 100 empty records and then add new records as the user chooses to do so?
This is what I want to do:-
Code:
struct employee
{
char emp_dept[20];
char emp_name[20];
float salary;
};
filename: pers_data.dat
To begin with the file will contain 100 records, each will look like the foll:
emp_dept = "unassgined"
emp_name = ""
salary = 0.00
so first 5 records will be
Code:
unassgined 0.00
unassgined 0.00
unassgined 0.00
unassgined 0.00
unassgined 0.00
Is it possible to update and delete records without creating a new file?
Kindly help.
Thanks