Re: language books don't get outdated
From: Mike Wahler (mkwahler_at_mkwahler.net)
Date: 08/26/04
- Next message: Mike Wahler: "Re: language books don't get outdated"
- Previous message: William Payne: "Adding empty copy constructor makes segfault go away?"
- In reply to: Gary Labowitz: "Re: language books don't get outdated"
- Next in thread: Gary Labowitz: "Re: language books don't get outdated"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 26 Aug 2004 17:18:39 GMT
"Gary Labowitz" <glabowitz@comcast.net> wrote in message
news:3Kadncl4hZaydLDcRVn-rQ@comcast.com...
> "Paul" <paul@paul.com> wrote in message
news:GcjXc.16994$oD2.105@trndny08...
> >
> > "Carter Smith" <news@email.icarusindie.com> wrote in message
> > news:XU2Xc.23719$L94.11173@fed1read07...
> > > I was going to say, if Paul actually knew C++ he would have known that
> the
> > > code would compile just by looking at it. It would have taken all of
> two
> > > minutes to test his theory before making his false claim on a
permanent
> > > venue.
> > >
> <snip>
> > Second, the new Visual C++ 7.x compiler will *not* compile the code.
The
> > reason is that there is no such file any more as <iostream.h>. Try it
an
> > see for yourself. As a matter of fact, the top rated web-site that
> answers
> > C++ questions (which I have been an active member of now for 5 years,
and
> > one of its biggest contributors as far as answering C++ questions), gets
> > queries from beginners as to why thei riostream.hladencodedoesn't
> > compile with the latest Visual C++ compiler.
>
> I thought the bone of contention was the use of <iostream.h> so I (sorta)
> automatically inserted std:: in front of the cout and tried the following
> code in .NET (7.1.3088)
>
> // t1.cpp : Defines the entry point for the console application.
> //
> #include <iostream.h>
> #include "stdafx.h"
> int _tmain(int argc, _TCHAR* argv[])
> {
> std::cout << "Hello, World!\n";
> return 0;
> }
>
> I hate all the MS stdafx stuff, but that was generated by the project
> builder. The above code compiles and runs just fine. So?
So, an implementation's behavior does not define correctness,
the language standard does.
The above ((even without the 'stdafx', with _tmain() changed to 'main(),
and _TCHAR changed to 'char'), is *not* standard compliant code.
> Changing it to
>
> #include <iostream.h>
> #include "stdafx.h"
> int main( )
> {
> std::cout << "Hello, World!\n";
> return 0;
> }
>
> Still compiled and worked fine.
Same remarks as above.
>[Now, how do I get rid of MS wanting
> precompiled headers? OT OT OT OT!!!]
<OT>
It's in the menus. I don't know where in 7.1, but in 6.0
it's in the 'Project Settings' dialog, "C/C++" tab, category
"Precompiled headers". There are choices to not use, use
'automatic', or use 'manually'.
</OT>
-Mike
- Next message: Mike Wahler: "Re: language books don't get outdated"
- Previous message: William Payne: "Adding empty copy constructor makes segfault go away?"
- In reply to: Gary Labowitz: "Re: language books don't get outdated"
- Next in thread: Gary Labowitz: "Re: language books don't get outdated"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|