Article View: rec.games.programmer
Article #2010Re: Should I learn C or C++ first?
From: Rainer Deyke
Date: Fri, 25 Aug 1995 13:14
Date: Fri, 25 Aug 1995 13:14
25 lines
1541 bytes
1541 bytes
P Moore906 (pmoore906@aol.com) wrote:
: >Yes, but "variety of styles" may very well include using purely the C
: >subset of C++. Some C++ features are actually pretty stupid, like
: >the 'new' and 'delete' operators that correspond to 'malloc' and
: >'free' but lack anything corresponding to 'realloc'.
: I don't know how you could call new and delete stupid. Dynamically
: allocating memory for a class and passing arguments to its constructors at
: the same time would be impossible without new and delete! How could you
: ever say:
: TApplication* MyApp;
: MyApp = new TApplication("My Application");
: without new and delete?
Why bother with doing both at the same time?
MyApp = (TApplication *)malloc(sizeof(TApplication));
create_TApplication(MyApp, "My Application");
--
+----------------------------------------------+
| Rainer Deyke (rainer@mdddhd.fc.hp.com) |
| "The Earth shall inherit the meek" - Carcass |
+----------------------------------------------+
Technical Details
Message-ID:
<41kici$p4t@deyke3.fc.hp.com>Path:
arc1-ca.pugleaf.net!fc.hp.com!hpfcmdd!deyke3!rainerReferences:
<DDJ2Lp.3DG@pentagon-ai.army.mil> <41afe9$d10@newsbf02.news.aol.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!fc.hp.com!hpfcmdd!deyke3!rainer From: rainer@deyke3.fc.hp.com (Rainer Deyke) Newsgroups: rec.games.programmer,comp.lang.c++ Subject: Re: Should I learn C or C++ first? Followup-To: rec.games.programmer,comp.lang.c++ Date: 25 Aug 1995 13:14:58 GMT Organization: my basement Message-ID: <41kici$p4t@deyke3.fc.hp.com> References: <DDJ2Lp.3DG@pentagon-ai.army.mil> <41afe9$d10@newsbf02.news.aol.com> Reply-To: rainer@mdddhd.fc.hp.com NNTP-Posting-Host: deyke3.fc.hp.com X-Newsreader: TIN [version 1.2 051093BETA PL3]