Posted on 2005-04-18
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
    LVL 30

    Expert Comment

    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

    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

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    Join & Write a Comment

    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++ ( I described how to encrypt text and recommended that the encrypted text be stored as a series of hexadecimal digits -- because cyphertext may…
    how to add IIS SMTP to handle application/Scanner relays into office 365.
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    730 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

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now