I've returned to a perfectly working old project written with VC++2002
but now VC++2003 is rejecting the .h standard header files and demanding the
std:: prefix before simple standard commands. Is there any way to get
around this? What could have been a two-minute addition of a single feature
is becoming a long rewrite of a vast expanse of code!

Re: std namespace and old code? by Jerry

Jerry
Sun Apr 25 12:40:40 CDT 2004

In article <O9UIsmuKEHA.3568@TK2MSFTNGP10.phx.gbl>, scc@buffalo.edu
says...
> I've returned to a perfectly working old project written with VC++2002
> but now VC++2003 is rejecting the .h standard header files and demanding the
> std:: prefix before simple standard commands. Is there any way to get
> around this? What could have been a two-minute addition of a single feature
> is becoming a long rewrite of a vast expanse of code!

After you've included the headers, put in:

using namespace std;

--
Later,
Jerry.

The universe is a figment of its own imagination.

Re: std namespace and old code? by Tim

Tim
Sun Apr 25 12:50:53 CDT 2004

Scott Corrigall wrote:
> I've returned to a perfectly working old project written with
> VC++2002 but now VC++2003 is rejecting the .h standard header files
> and demanding the std:: prefix before simple standard commands. Is
> there any way to get around this? What could have been a two-minute
> addition of a single feature is becoming a long rewrite of a vast
> expanse of code!

Is it specifically <iostream.h> that it's rejecting? The old-style
<iostream.h> and related headers were removed for VC++ 2003. You'll need to
convert your code to use the newer Standard C++ stream classes instead.

(Yes, it's a big breaking change. Our company's projects required extensive
work to move them from 2002 to 2003 because of this.)

--
Tim Robinson (MVP, Windows SDK)
http://mobius.sourceforge.net/



Re: std namespace and old code? by tom_usenet

tom_usenet
Mon Apr 26 08:40:55 CDT 2004

On Sun, 25 Apr 2004 18:50:53 +0100, "Tim Robinson"
<tim.at.gaat.freeserve.co.uk@invalid.com> wrote:

>Scott Corrigall wrote:
>> I've returned to a perfectly working old project written with
>> VC++2002 but now VC++2003 is rejecting the .h standard header files
>> and demanding the std:: prefix before simple standard commands. Is
>> there any way to get around this? What could have been a two-minute
>> addition of a single feature is becoming a long rewrite of a vast
>> expanse of code!
>
>Is it specifically <iostream.h> that it's rejecting? The old-style
><iostream.h> and related headers were removed for VC++ 2003. You'll need to
>convert your code to use the newer Standard C++ stream classes instead.
>
>(Yes, it's a big breaking change. Our company's projects required extensive
>work to move them from 2002 to 2003 because of this.)

Still, std has been standard (and accepted by MSVC) since 1998, so
only really old code should be affected.

Tom
--
C++ FAQ: http://www.parashift.com/c++-faq-lite/
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html