Question: How do I get the program to access my numbers document? also I have this code but I dont know how to copy to dev
How do I get the program to access my numbers document? also I have this code but I dont know how to copy to dev c to get it to work, I tried creating different source files labeling them accordingly but got an error saying "stdax." no such file in directory. So I cant run it and I tried using another code on here but it wouldnt access the number document keep in mind i dont know anything about files io#include "stdafx.h
#include "List.h
#include
LinkedList.cpp : Defines the entry point for the console application.
#include "stdafx.h
#include "List.h
#include
#include
#include
using namespace std;
int main
List list new List;
string line;
ifstream myfilenumberstxt;
if myfileisopen
while getlinemyfile line
listInsertstodline;
myfile.close;
else cout "Unable to open file";
listDisplay;
listDeletNegative;
listDisplay;
int index;
cout "Enter index to insert : ;
cin index;
double num;
cout "Enter number to insert : ;
cin num;
listInsertindex num;
listDisplay;
cout "Enter index to delete : ;
cin index;
listDeleteindex;
listDisplay;
return ;
List.cpp:
#include
#include "List.h
#include
using namespace std;
List::List
List::~List
void List::Insertint index, double value
int count ;
Node node root;
Node parent root;
if node NULL && index
return;
;
if node NULL && index
Node newnode new Node;
newnodedata value;
newnodenext NULL;
nodenext newnode;
return;
if node NULL && index
Node newnode new Node;
newnodedata value;
newnodenext node;
root newnode;
return;
while nodenext NULL
parent node;
node nodenext;
count;
if count index
break;
if count index
cout "invalid index" endl;
return;
if node NULL
Node newnode new Node;
newnodedata value;
newnodenext NULL;
newnodenext node;
parentnext newnode;
return;
void List::Insertdouble value
Node node root;
if node NULL
root new Node;
rootdata value;
rootnext NULL;
return;
;
while nodenext NULL
node nodenext;
Node newnode new Node;
newnodedata value;
newnodenext NULL;
nodenext newnode;
return;
void List::Deleteint index
int count ;
Node node root;
Node parent root;
if node NULL && index
cout "invalid index" endl;
return;
;
if node NULL && index
root nodenext;
return;
while nodenext NULL
parent node;
node nodenext;
count;
if count index
break;
if count index
cout "invalid index" endl;
return;
if node NULL
parentnext nodenext;
return;
void List::Display
Node node root;
if node NULL return;
while nodenext NULL
cout nodedata endl;
node nodenext;
cout nodedata endl;
return;
void List::DeletNegative
Node node root;
Node parent root;
if node NULL return;
while nodenext NULL
if nodedata
parentnext nodenext;
parent node;
node nodenext;
return;
List.h:
#pragma once
struct Node
double data;
struct Node next;
;
class List
public:
List;
~List;
void Insertint index, double value;
void Insertdouble value;
void Deleteint index;
void Display;
void DeletNegative;
private:
Node root;
;
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
