Given a file named execution.log write the necessary code to add the line “Program Execution Successful” to the end of the file.

4
Given a file named execution.log write the necessary code to add the line “Program Execution Successful” to the end of the file.

LANGUAGE: C++

CHALLENGE:

Given a file named execution.log write the necessary code to add the line “Program Execution Successful” to the end of the file.

SOLUTION:



ofstream e_Log;
e_Log.open("execution.log", ios::app);

e_Log << "Program Execution Successful";
e_Log.close()

4 comments

Add comment