Close the files

Listing 6 invokes the close method on both of the file I/O stream objects to flush the output buffers, disassociate the stream objects from the two specific files, etc

So now you know how to read and write data from files in C++ and how to use that data in conjunction with arrays, which is another requirement of the Master Syllabus for this course.

Listing 6 also signals the end of the doSomething function, and the end of the lesson.