ILE C/C++ Programmer's Guide

Minimizing the Number of File Opens and Closes

Open and close are very expensive operations. You can improve performance by opening and closing files only as often as necessary. You can use a class to encapsulate I/O operations such as opening the files once, and not closing the file until the end of the program.


[ Top of Page | Previous Page | Next Page | Table of Contents ]