Está en la página 1de 1

#include

using
{struct
};
void
int
student
int
string
main()
char
LinkedList
student
do{
print_list(
student_scan
search_4node
namespace
student
credits;
cout
cin
{choice
switch(choice)
*add_node(
<iostream>
"LinkedList.h"
choice;
student_name;
*head;
*next;
*head
>>
case
<<=choice;
<student>
"std;
head
//if
//
a.makeEmpty();
break;
print_list(head);
string
cout
student
toupper(choice);
'A':
'Q':
'C':
'P':
'F':
(student
=(student*&
A:
Q:
FPC:
student
:nullptr;
else
cout
Totosearch_name;
Quit
(=to
cout
<<
add_node(head);
a.isEmpty())
add
"check
*in_root);
a;//
print
scan
if
<<
the
<<
Enter
*in_root);
"(a*in_root);
"head,
test
Node"
program"
if
the
!a.isEmpty())
The
the
The
the
the
student
list
string
objective
list"
linked
<<list
student
endl;
<<
is
<<NOT
search4item);
endl;
in
for
list
endl;
name
empty
credits
empty"
isthat
empty"
or<<you
not"
over
endl;
<<would
<<endl;
100"
endl;
<< endl;
like
to search f
}{or
vsoid
tudent
"}else{
while
return
else
student
next_ptr
{if
<<cout
print_list(
search_4node
(}while
endl;
*add_node(
else{
//list
next_ptr
prev_ptr
{if
else
return
in_root
next_ptr
(<<
0;next_ptr
(((
choice
*next_ptr
*prev_ptr
next_ptr->next
return
prev_ptr->
cin
next_ptr->
*next_ptr;
cout
=((next_ptr
"(in_root
isEmpty
next_ptr;
has
next_ptr
in_root;
cin
search_4node(head,
cout
break;
next_ptr
>>
===(student*&
student
<<
<<"
empty
==
!=""Enter
student
NULL;
members
in_root;
next_ptr;
next_ptr->student_name;
next_ptr->credits;
>>=Has:
NULL)
<<Student:
NULL)
='Q');
Enter
Please
Error:
List
search_name;
in_root;
next_ptr
next
next=
next_ptr->next;
head->student_name
NULL;
=new
!=
->next
*in_root)
"new
=*in_root)//
:the
NULL)
student)
=the
<<
enter
NULL;
unable
No
head,
student)
next_ptr;
"credit
next_ptr
amount
!=
->next;
nodes
{ string
<<
search_name);
NULL)
the
to!=to
next_ptr
number
we->
of
!=
students
allocate
NULL)
print.."<<
add
credits
NULL)
search4item)
<<->student_name
credits<<
";aendl;
node
memory."
name
memory"
forendl;
"tothe
"credits"<<
<<<<
//
the
<<function
student"
endl;
endl;
program
endl;
<<
endl;
endl;
<< search
to
endl; for
{the{if(
node,
headthen
cout
== NULL)
<<"
deletes
The itemitthat you were looking for, IS NOT inside of the list!"
}<< endl;
{ search_4node(head->next,search4item);
}else
cout
if (<<head
"The->student_name
item you are searching
== search4item)
for IS inside the list!"<< endl;