Path: news.mv.net!news.shore.net!newsfeed.mathworks.com!portc01.blue.aol.com!europa.netcrusader.net!194.176.220.130!newsfeed.icl.net!diablo.theplanet.net!news.theplanet.net!newspost.theplanet.net!not-for-mail From: Jason Green Newsgroups: comp.os.msdos.djgpp Subject: Re: *** OFF-TOPIC *** Re: ok, I have more info on problem at hand Date: Sat, 02 Sep 2000 22:54:11 +0100 Organization: Customer of Energis Squared Lines: 36 Message-ID: References: <8oqt7m$6of$1 AT plato DOT wadham DOT ox DOT ac DOT uk> NNTP-Posting-Host: modem-120.delaware.dialup.pol.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: newsg4.svr.pol.co.uk 967931689 5373 62.137.59.120 (2 Sep 2000 21:54:49 GMT) NNTP-Posting-Date: 2 Sep 2000 21:54:49 GMT X-Complaints-To: abuse AT theplanet DOT net X-Newsreader: Forte Agent 1.7/32.534 Xref: news.mv.net comp.os.msdos.djgpp:103112 J-P wrote: > >> ... unless you ever want to resize, in which case use malloc() and > >> realloc() and explicitly cast the pointers. > > > >The standard containers will let you resize. > > Do you mean the standard classes? Because I'm sure even Bjarne Stroustrup > (sp?) has said otherwise in some tome, but I could be wrong. "Using resize() on a vector is very similar to using the C standard library function realloc() on a C array allocated on the free store." - Bjarne Stroustrup, C++PL3. > If so, that isn't much use if you're not using the standard classes. This is precisely the argument *for* using the STL. Increased flexibility/efficiency and no performance hit. That's the theory anyway - I couldn't possibly comment. ;-) > I merely wanted to mention it as an /option/, not as a flame. Which is why > I don't particularly want to redirect this to comp.lang.c++, because [a] > they probably only deal with the ANSI recommendation, whatever that is > this week (that sort of , and [b] they've probably had this argument > several times before, initiated with the intention of flaming. > > If malloc() has no place in C++, then it's odd that you're still able to > use it. I didn't say that malloc() has no place in C++. (but I can see how you might read that). The C++ standard, as far as possible, is backward compatible with conforming C code. However, there were a few things the C++ standard committee felt were more important then backward compatibilty, and implicit conversion of void pointers was one of them.