Posted on 2005-04-18
Medium Priority
Last Modified: 2012-06-21
When i try to build my C++ Code (written in VS 6.0), on VS .NET I get the following warning, which occurs with the .NET include library.
I do not get this warning when i build on VS 6.0

C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\useoldio.h(29) : warning C4995: '_OLD_IOSTREAMS_ARE_DEPRECATED': name was marked as #pragma deprecated

I also see no reference to "iostream" header file in any of my code.

Can anyone tell me how to get rid of this warning.

Question by:hari4130
  • 2
LVL 30

Expert Comment

ID: 13807628
Hi hari4130,
> >I also see no reference to "iostream" header file in any of my code.

Look for any STD headers that are using *.h extension.
These files are not part of the C++ standard, and should not be used.
To get rid of the error, just modify your code so that you're using the extensionless version.

If you're not using <iostream.h>, you could be using another *.h header that is calling <iostream.h>

Look for files like the following:
#include <fstream.h>
#include <sstream.h>
#include <ios.h>
If you find any of the above files, convert it to extensionless version.
#include <fstream>
//You also might need to add using namespace std
using namespace std;

David Maisonave :-)
LVL 30

Accepted Solution

Axter earned 800 total points
ID: 13807671
Here's a list of *.h files I found on VC++ 6.0 that reference <iostream.h>


Make sure you don't have a reference to the above files in your code.

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The following diagram presents a diamond class hierarchy: As depicted, diamond inheritance denotes when two classes (e.g., CDerived1 and CDerived2), separately extending a common base class (e.g., CBase), are sub classed simultaneously by a fourt…
In Easy String Encryption Using CryptoAPI in C++ (http://www.experts-exchange.com/viewArticle.jsp?aid=1193) I described how to encrypt text and recommended that the encrypted text be stored as a series of hexadecimal digits -- because cyphertext may…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question