Question: / / main . cpp / / File: main.cpp #include SinglyLinkedList.h #include #include #include using namespace std; Node * listSearch ( LinkedList * list,
maincpp
File: main.cpp
#include "SinglyLinkedList.h
#include
#include
#include
using namespace std;
Node listSearchLinkedList list, const int key;
string listDescriptorLinkedList list;
int main
cout No implementation given.";
return ;
end main
Node listSearchLinkedList list, const int key
Node current listhead;
while current
if currentnextid key
return current;
current currentnext;
return nullptr; Key not found
string listDescriptorLinkedList list
ostringstream oss;
Node current listhead;
while current
oss currentnextdescriptor endl;
current currentnext;
return oss.str;
Personh
#ifndef PERSONH
#define PERSONH
#include
#include
using namespace std;
class: Person
Stores personal information
class Person
public:
int id;
string first;
string last;
Personconst int id const string& first na const string& last na
: idid firstfirst lastlast
string descriptor const
ostringstream oss;
oss
id: id
"first:" first
"last:" last
;
return oss.str;
;
#endif
SinglyLinkedListh
#ifndef SINGLYLINKEDLIST
#define SINGLYLINKEDLIST
#include
using namespace std;
class Node
public:
string name;
Node next;
Node
next nullptr;
Nodestring fname, string lname
name fname lname;
thisnext nullptr;
;
class LinkedList
public:
Node head, tail;
LinkedList
head tail nullptr;
tail new
;
#endif
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
