Question: C++ Use the answer box to write C++ statements to do the following tasks : Open a binary file (for random access file processing) for
C++



Use the answer box to write C++ statements to do the following tasks : Open a binary file (for random access file processing) for reading. The file name is "binfile.dat". Write a structure ,City ,for a record that contains a city name of 20 characters and its population. The structure is used for a binary file processing. Use the structure City in the previous question and if there are five records of information written to a binary file, myfile.dat. Come up with statements that will open the file for reading as a binary file and search for the last record , read the record, and display the city name and its population to the screen
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
