Question: 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.0
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
