Write a C++ program using dynamic variables and pointers to construct a doubly linked list consisting of the following information in each node: student id (integer), student name (character string), and semester (integer). The operations to be supported are:
(a) Create a doubly linked list by adding each node at the front.
(b) Deleting a node based on student id. If the specified node is not present in the list an error message should be displayed. Both the options must be demonstrated.
(c) Searching a node based on student id and updates the information content. If the specified node is not present in the list an error message should be displayed. Both the options must be demonstrated.
(d) Display the contents of the list either from the first node to the last or from the last to the first node.
1
Expert's answer
2011-10-14T08:12:24-0400
// LinkedList.cpp : Defines the entry point for the console application. //
Comments
Leave a comment