CAN YOU PLEASE TELL MY WHY MY PROGRAM IS NOT RUNNING CORRECTLY ON DEV C++?
CAN YOU PLEASE TELL MY WHY MY PROGRAM IS NOT RUNNING CORRECTLY ON DEV C++?
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Related questions
Question
CAN YOU PLEASE TELL MY WHY MY PROGRAM IS NOT RUNNING CORRECTLY ON DEV C++? I DO NOT UNDERSTAND WHY!
![es - [apples.dev] - [Executing] - Dev-C++ 5.11
dit Search View Execute Tools
Project
AStyle
Window Help
CA. C:\Users\Shorty\Desktop\c++\apples.exe
34
Int choiee;
float price;
string itennans,
No sce wLL aluoys odd at the and of Ltst without dalatng tha previous Liat
obj.open (arocery.txt");
35
37
38
39
coutee1. Enter Groceries 2.Show Groceries\n3.Exit\a"<cendl;
couts Enter your choice:"ccendl,
ein>cholee;
while (choicesa)
41
42
43
44
coutss Enter grocery Iten Nane:"<cend1,
cin>itannane
couts<"enter Grocery"<<itennane <<"Cost:"<cendl;
45
45
47
48
obja"stennane"<<"s"<"price"<cendl,
49
50
1f(chosce 2)
52
53
54
neadGroceryLIst(arocery.tat");
coutc"1.eAter Grocerses A2. Show Groceries\a3. Exita;
coutes enter your chosce.
37
59
return e
63](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F9e5bb8ec-c6a4-49a6-9a83-fe508b728821%2Fb36eb4c1-8ca5-4e14-8973-e5e9515df2e6%2Feo7iil_processed.jpeg&w=3840&q=75)
Transcribed Image Text:es - [apples.dev] - [Executing] - Dev-C++ 5.11
dit Search View Execute Tools
Project
AStyle
Window Help
CA. C:\Users\Shorty\Desktop\c++\apples.exe
34
Int choiee;
float price;
string itennans,
No sce wLL aluoys odd at the and of Ltst without dalatng tha previous Liat
obj.open (arocery.txt");
35
37
38
39
coutee1. Enter Groceries 2.Show Groceries\n3.Exit\a"<cendl;
couts Enter your choice:"ccendl,
ein>cholee;
while (choicesa)
41
42
43
44
coutss Enter grocery Iten Nane:"<cend1,
cin>itannane
couts<"enter Grocery"<<itennane <<"Cost:"<cendl;
45
45
47
48
obja"stennane"<<"s"<"price"<cendl,
49
50
1f(chosce 2)
52
53
54
neadGroceryLIst(arocery.tat");
coutc"1.eAter Grocerses A2. Show Groceries\a3. Exita;
coutes enter your chosce.
37
59
return e
63
![pals)
apple.cpp
#include ciostream>
include cstring
include cfstreans
ušing nanespace std;
/ereete the funetion naodsrocerylist to ead the FILE
Weoss the none of the fLLe
void neadGrocerylist(string filenama)
ifstream myfile("#51emane");
/ereate strLng Ltne
string str;
while ("getline(file,str)")
for (int i-e; i < str.length():1++)
if (str [1] --'S')
cout<4"\t";
cout<<str [1;
cout<<end1;
int main()
Readőrocerylist ("arocery.txt");
return e:
int choice ()E
ofstream obi:
int choice,
float price
string itemNans,
obj.open ("arocery.txt"),
cout<<"1.Eater Groceries \n2.Show Grocerits\n3.Exit*cendl;
cout<<"ENter your choice:"<endl;
cinsschoice
while (choics43)
cout<<"Enter rocery Iten Nan:"endl;
cinssitemNama;
cout"EAter Grocery"<itemNanG<<"Cost."cendl,
cin>»price,
obje«"itemName"<4"$"<<"Price"<<endl;
if (choice --2)
//-0LL che funetion aneery Lis te disoloy on aersn
neadGrocerylist("arocery.Ext");
cout4"1.EAter Groceries 2.Show Groceries\n3. Exit\a":
cout"Enter your choice:",
cin>choice;
obj.close(); //LOstng cha FLLABS
return e;
日日](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F9e5bb8ec-c6a4-49a6-9a83-fe508b728821%2Fb36eb4c1-8ca5-4e14-8973-e5e9515df2e6%2Fthfbneq_processed.jpeg&w=3840&q=75)
Transcribed Image Text:pals)
apple.cpp
#include ciostream>
include cstring
include cfstreans
ušing nanespace std;
/ereete the funetion naodsrocerylist to ead the FILE
Weoss the none of the fLLe
void neadGrocerylist(string filenama)
ifstream myfile("#51emane");
/ereate strLng Ltne
string str;
while ("getline(file,str)")
for (int i-e; i < str.length():1++)
if (str [1] --'S')
cout<4"\t";
cout<<str [1;
cout<<end1;
int main()
Readőrocerylist ("arocery.txt");
return e:
int choice ()E
ofstream obi:
int choice,
float price
string itemNans,
obj.open ("arocery.txt"),
cout<<"1.Eater Groceries \n2.Show Grocerits\n3.Exit*cendl;
cout<<"ENter your choice:"<endl;
cinsschoice
while (choics43)
cout<<"Enter rocery Iten Nan:"endl;
cinssitemNama;
cout"EAter Grocery"<itemNanG<<"Cost."cendl,
cin>»price,
obje«"itemName"<4"$"<<"Price"<<endl;
if (choice --2)
//-0LL che funetion aneery Lis te disoloy on aersn
neadGrocerylist("arocery.Ext");
cout4"1.EAter Groceries 2.Show Groceries\n3. Exit\a":
cout"Enter your choice:",
cin>choice;
obj.close(); //LOstng cha FLLABS
return e;
日日
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Recommended textbooks for you
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
![Concepts of Database Management](https://www.bartleby.com/isbn_cover_images/9781337093422/9781337093422_smallCoverImage.gif)
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
![Prelude to Programming](https://www.bartleby.com/isbn_cover_images/9780133750423/9780133750423_smallCoverImage.jpg)
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
![Sc Business Data Communications and Networking, T…](https://www.bartleby.com/isbn_cover_images/9781119368830/9781119368830_smallCoverImage.gif)
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY