Question: For this assignment in C++ we are making an accounting system. my question is for this function how do I read from files and get
For this assignment in C++ we are making an accounting system. my question is for this function how do I read from files and get information off the file and create an instance of that object from it?
If you can just show a basic example that would work wonderfully
Account createAccount(std::string file)
* The function shall look for a file matching the name of the parameter that is passed to the function. The file contains the name, interest rate, and starting balance in that order
* You may assume that each of the three items are contained on their own line
* You may NOT assume that the name of the account contains only a single word
* You may also assume that a positive and valid (whole number or no more than two decimal places) amount of money will be contained in the file * An Account object with the proper values is then returned
* If the file does not exist or otherwise cannot be opened, a default Account with name Savings, an interest rate of 1%, and a starting balance of $100.00 is returned
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
