Answered step by step
Verified Expert Solution
Question
1 Approved Answer
This is for C++. How do i read a file, and put the information into a struct. Also how do I stop reading the file
This is for C++. How do i read a file, and put the information into a struct. Also how do I stop reading the file when it reaching the string STOP.
struct Account
{
string name;
int iD;
double balance;
};
Sample Input File (sample_t1.txt): Tom 1000 10.55 Alice 2000 200.75 John 3000 69.57 Alice 1500 8.0 Jason 2500 555.55 STOP -1 -1.0Step 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