Question: Turn in all the c + + code down below into C #include #include #include List.h using namespace std; List::List ( ) { head
Turn in all the c code down below into C
#include
#include
#include "List.h
using namespace std;
List::List
head NULL;
curr NULL;
temp NULL;
void List::AddNodeint addData
nodePtr n new node;
nnext NULL;
ndata addData;
ifhead NULL
curr head;
whilecurrnext NULL
curr currnext;
curr next n;
else
head n;
void List::DeleteNodeint delData
nodePtr delPtr NULL;
temp head;
curr head;
whilecurr NULL && currdata delData
temp curr;
curr currnext;
ifcurr NULL
cout delData "was not in the list
;
delete delPtr;
else
delPtr curr;
curr currnext;
tempnext curr;
ifdelPtr head
head headnext;
temp NULL;
delete delPtr;
cout "The value" delData "was deleted
;
void List::PrintList
curr head;
whilecurr NULL
cout curr data endl;
curr currnext;
Turn in all the c code down below into C
#include
#include "List.h
using namespace std;
int mainint argc, char argv
List Rachael;
Rachael.AddNode;
Rachael.AddNode;
Rachael.AddNode;
Rachael.PrintList;
Rachael.DeleteNode;
Rachael.PrintList;
return ;
#ifndef LISTH
#define LISTH
class List
private:
typedef struct node
int data;
node next;
nodePtr;
nodePtr head;
nodePtr curr;
nodePtr temp;
public: This is where the functions go
List;
void AddNodeint addData;
void DeleteNodeint delData;
void PrintList;
;
#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
