From: JMK Newsgroups: comp.os.msdos.djgpp Subject: Re: whats wrong with my compiler Date: Mon, 18 Nov 2002 10:39:47 -0800 Organization: Lockheed Martin Corporation Lines: 79 Message-ID: <3DD933F3.40F1D40F@lmco.nospam.com> References: <20021115043144 DOT 31342 DOT qmail AT web13005 DOT mail DOT yahoo DOT com> NNTP-Posting-Host: 129.197.49.226 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.61 [en] (WinNT; U) X-Accept-Language: en To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Thomas Mueller wrote: > > Excerpt from Thomas Tutone : > > > I agree with the point you make - that this trap has > caused misery for newbies everywhere, and that this is > unfortunate. But I think the advice you would give is > wrong. Using is a really bad idea. Let > me explain why. On many platforms, you can't mix > standard headers (like ) with legacy headers > (like , even if those legacy headers still > exist. Question then: Is this by intent/design of the Standards committee or is it an artifact of bad vendor implementation? Think about what that means. On such > platforms, if you use , you can't use > , or , or , or other > components of the modern C++ Standard Library without > getting compile errors. You're stuck using the > pre-standard versions, if they exist. In other words, > it leads to many, many additional compile errors, and > a lot more confusion. That means that programmers who > get in the habit of using , as you > advocate, will have endless problems once they advance > beyond "Hello World" programs. Better that they > should learn the correct usage in the first place. Correct is too laden a word to use here. Current is perhaps more appropriate. The use of iostream.h vs. iostream is going to be just one of many tricks of porting that many C++ programmers are going to have to be aware of. I wouldn't disagree that it is best to use the latest and greatest, however, C++ appears to have a problem with changing moreso than other software products out there. As to good or bad remains to be seen regarding how much cost this is going to impose on porting legacy code. And.... for those who learn by picking up a book and learning at home and who are going to spend countless hours trying to figure out why their code as written will not work.......let's not go there. > That was why I encouraged the original poster to get a > copy of Koenig (also heavily involved in drafting the > standard) and Moo's "Accelerated C++." It teaches the > proper habits from the start. So does Stroustrup's > book, but it's pretty hard for beginners to follow. At sometime you will need to get Stroustrup's book. Vendors don't argue with you when you say your code doesn't work as compared with Stroustrup. Usually they say, send us a sample - please. > > > My apologies to the mailing list for my off-topic > rant. But it bums me out when I see people making this > mistake, and even more so when I see other members of > the list encouraging them to do so. > > No need to apologize, I wouldn't call it off-topic. Programmers need to know > why using old standards is likely to lead to errors. If properly written and properly compiled, there should be no problems. The fact that someone isn't using the latest and greatest shouldn't be an issue. > > I just looked and found my copy of Bjarne Stroustrup's book was the second > edition, so will have to get the third, and look to online sources for things > like tutorials. I am out of practice programming C and C++ but not a beginner. I don't remember if the Third Edition or Special Edition is current, but be aware! Jeff