Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

#include <iostream.h> error

Status
Not open for further replies.

mycophobiac

Programmer
May 18, 2003
6
US
When using #include <iostream.h> in my compiler, it generated the following error and terminated execution:

&quot;#warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <sstream> instead of the deprecated header <strstream.h>. To disable this warning use -Wno-deprecated.&quot;

If/how can I fix this error? Thanks in advance for any help.
 
Just say &quot;#include<iostream>&quot; withhout the &quot;.h&quot;.

Doing so is the new standard for including files, but you will need to worry about namespaces.

E.G. If you use &quot;cout&quot; you will need to do this:

#include<iostream>
using std::cout;

Tell me if you'd like to know more.
 
And by the way, it's not an error, but a warning. It still compiled and will more than likely still work.

Still, go with <iostream>.
 
Okay, thanks for all the help, It will now compile succesfully!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top