Professional Documents
Culture Documents
Structs & Pointers (With FILE IO) : Mini-Project: Maintain Employee Records (Double-Linked List) in Files
Structs & Pointers (With FILE IO) : Mini-Project: Maintain Employee Records (Double-Linked List) in Files
NOTE: This is the same project that was done in the “Structs & Pointers” module. You are
expected to now update this project to achieve data persistence across run cycles. In other
words, you are expected to implement File IO operations in this project. This can be
achieved by saving the values of each node (as a record) in a file, and reading these values
back again when the program is re-started so that all previous node’s values should still be
available across each runs of the program.
=====================
***** Main Menu *****
=====================
1. Add Node
2. Delete Node
3. Search Node
4. Display List
5. Cleanup (Delete all nodes)
6. EXIT
Enter your option (1..6) : __
The program should display the above menu, and perform these operations in order to main records of
various employees in an organization.
Design considerations:
struct EMP
{
string emp_name;
int emp_id;
2. The program should define two global variables, head and tail, representing pointers to the first and
the last node in the linked list at any point of time.
3. The program should use user-defined functions to perform each of the functions in the above menu.
4. The prototypes of the functions should be as specified in the table (see next page).
This function should display the contents of all the nodes in the
linked list. It should start with the title -
EMP Name =
EMP id =
This function should delete (deallocate memory for) all the nodes
in the list.