Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Trying to read in input of integers and insert them into file, but how do I get the loop to end once itnergers have all
Trying to read in input of integers and insert them into file, but how do I get the loop to end once itnergers have all been inputed. For example if I enter 34 56 12. It is then inserted into the file and the loop should end once all numbers are inserted but it does not. After it runs through the loop 3 times to insert those nubmers it goes back to the top and wants me to enter more numbers when it should exit the loop and continue with the rest of the program.
while(cin >> f && f CharFile
Step 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