Make the Old iostream Library the Default
If you want to retain the old iostream library, include one or more of the old iostream header files in your code:
#include <fstream.h>
#include <iomanip.h>
#include <ios.h>
#include <iostream.h>
#include <istream.h>
#include <ostream.h>
#include <streamb.h>
#include <strstrea.h>
Do not use the new Standard C++ headers. You cannot mix calls to the old iostream and the new Standard C++ library. See for a list of the new Standard C++ header files. Many of the new Standard C++ iostream header files (fstream
, iomanip
, ios
, iosfwd
, iostream
, istream
, ostream
, sstream
, streambuf
, and strstream
) have names that are the same as or similar to the old iostream header files but without the .h
extension. Be sure to include the .h
extension if you want to use the old iostream library.
The old iostream library is contained in the following run-time library files: LIBCI.LIB, LIBCIMT.LIB, and MSVCIRT.LIB. The debug versions are contained in LIBCID.LIB, LIBCIMTD.LIB, and MSVCIRTD.LIB.
If you include the old iostream header files, the run-time library files that contain the old iostream library will be the default libraries. For example, if you choose Multithreaded in the Use run-time library drop-down list in the Code Generation category of the C/C++ tab in the Project Settings dialog box, and you have included an old iostream header file in your code, LIBCIMT.LIB becomes the default library.
For a description of all the C run-time libraries, seethe C Run-Time Libraries and C Run-Time Debug Libraries.