Problem:
Question 1: When do you open the file as an ifstream, as an ofstream, or as an fstream? Could you simply open all files as an fstream?
Question 2: Why is the ifstream parameter of the read_data procedure in the previous question a reference parameter and not a value parameter?
Please describe your naswers in detail.