Question: *** I just need help finishing this program off. I need a display function, that after you modify or delete a student info it displays

*** I just need help finishing this program off. I need a display function, that after you modify or delete a student info it displays on the screen***

#include #include #include #include using namespace std; bool check = true; struct node { char name[20]; int idNum; float gpa;

node *next; }*head,*lastptr;

void Add() //Add Student's Info// { node *p; p=new node; cout<<"Enter name of student:"<>p->name; fflush(stdin); cout<<"Enter Id Number of student:"<>p->idNum; fflush(stdin); cout<<"Enter GPA of student:"<>p->gpa; fflush(stdin); p->next=NULL;

if(check) { head = p; lastptr = p; check = false; } else { lastptr->next=p; lastptr=p; } cout<>id_Num; prev=head; current=head; while(current->idNum!=id_Num) { prev=current; current=current->next; } ptr=new node; fflush(stdin); cout<<"Enter name of student:"<name); fflush(stdin); cout<<"Enter ID number of student:"<>ptr->idNum; fflush(stdin); cout<<"Enter GPA of student:"<>ptr->gpa; fflush(stdin); prev->next=ptr; ptr->next=current->next; current->next=NULL; delete current; cout<>id_Num; prev=head; current=head; while(current->idNum!=id_Num) { prev=current; current=current->next; } cout<<" name: "; cout<name; cout<<" ID number:"; cout<idNum; cout<<" GPA:"; cout<gpa; getch(); } void Delete() //Deletes Student's Info// { node *ptr=NULL; node *prev=NULL; node *current=NULL; int id_Num; cout<<"Enter ID Number to Delete:"<>id_Num; prev=head; current=head; while(current->idNum!=id_Num) { prev=current; current=current->next; } prev->next = current->next; current->next=NULL; delete current; cout<

int main() { int choice; do { cout<<"Option: "<

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!