In addition to run-time library file-handling routines and Win32 API file-handling routines, Visual C++ supplies MFC class and several derived classes, such as for text files. Use CFile in your MFC programs.
For more information about alternatives to MFC file handling, see File Handling in the Run-Time Library Reference and in the Platform SDK.
What do you want to do?
Use MFC Serialization (Object Persistence)