You are to write a C++ function that given the name of a file passed as a string, the function will dynamically create an ofstream object. The function will open the file with the provided name. It will then make sure that the file properly opened. The function will then return a pointer to the ofstream object that was created.

icon
Related questions
Question
You are to write a C++ function that given the name of a file passed as a string, the function will
dynamically create an ofstream object. The function will open the file with the provided name. It
will then make sure that the file properly opened. The function will then return a pointer to the
ofstream object that was created.
Transcribed Image Text:You are to write a C++ function that given the name of a file passed as a string, the function will dynamically create an ofstream object. The function will open the file with the provided name. It will then make sure that the file properly opened. The function will then return a pointer to the ofstream object that was created.
Expert Solution
steps

Step by step

Solved in 3 steps with 2 images

Blurred answer