Answered step by step
Verified Expert Solution
Question
1 Approved Answer
What is wrong with my code? Why is it in infinite loop? this is the file which it is reading, the code, and the infinite
What is wrong with my code? Why is it in infinite loop? this is the file which it is reading, the code, and the infinite loop execution.
Lab01-SalesReceipts-Microsoft Visual Studio File Edit View Project Build Debug Team Tools Test Analyze Window Help Debug x86 Local Windows Debugger - Lab01-SalesReceipts.cpp Lab01-SalesReceipts - (Global Scope) / Laben salesreceipts.cpp: Defines the entry point for the console application. 2 Samuel Gonzalez Checa R-include "5tda#x"h" include "1onanip 6 tinclude "iostrean include "fstream" 8 winclude "string using namespace std int main) 16 char lastNane, firstNane, tranCode int itenquantity; double itenPrice, singlePrice, totalsun e receiptFile; ifstrean receiptFile.cpen("salesReceipts.txt 15 cout trancode > iterPrice x itenQuantity; while CneceiptF11c.eofO) 25 singleprice . itenprice itenquantity; totalsunsingleprice; cout > lastane > firstNane > trancode > iterPrice > itenQuantity; 29 receiptFile.closecO: systen("pause") return e 35 36Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started