Question: Write to file 5 0 points implement use of the ofstream class at the end of your program to write out to a binary file

Write to file 50 points
implement use of the ofstream class at the end of your program to write out to a binary file the three balance amounts for each of the account variables. Remember the ordering so that when you write the input code the balances will go to the correct account variable.
Example file contents:
Will be in binary
Confirm your output code is working by opening the file in Visual Studio ( drag and drop the file ) to see if its contents are what you expect it to be. The file will be in the same directory as your .vcxproj file (the project, not solution).
Read from file ()50 points
If all is well, implement use of the ifstream class at the beginning of your main so that, if the binary file exists (.is_open()), the contents will be deposited into your three account variables. If the file does not exist, keep the original initialization deposit code you had before.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!