| delorie.com/archives/browse.cgi | search |
| From: | sparhawk AT eunet DOT at (Gerhard Gruber) |
| Newsgroups: | comp.os.msdos.djgpp |
| Subject: | Re: How big can I make my array? |
| Date: | Mon, 08 Jun 1998 21:35:34 GMT |
| Organization: | Customer of EUnet Austria |
| Lines: | 21 |
| Message-ID: | <357c0c3a.24494159@news.Austria.EU.net> |
| References: | <MPG DOT fe223cb1cc75732989717 AT news DOT virgin DOT net> <3578C43D DOT F4DDB90 AT cs DOT com> <MPG DOT fe3efebb95c6032989725 AT news DOT virgin DOT net> <357AB3E4 DOT 316B4ED2 AT cs DOT com> |
| NNTP-Posting-Host: | e173.dynamic.vienna.at.eu.net |
| Mime-Version: | 1.0 |
| To: | djgpp AT delorie DOT com |
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Destination: "John M. Aldrich" <fighteer AT cs DOT com>
From: Gruber Gerhard
Group: comp.os.msdos.djgpp
Date: Sun, 07 Jun 1998 11:38:12 -0400:
>When writing C++ code, the new operator should always be used instead of
>malloc(). You must also remember to use the indirection operator ('->')
I heard this a number of times but I don't see any advantage or disadvantage.
When I allocate i.e. a string (like char *x = malloc(n)) I don't see the
reason why I should use new instead of malloc(). Is there a drawback to
malloc()?
--
Bye,
Gerhard
email: sparhawk AT eunet DOT at
g DOT gruber AT sis DOT co DOT at
Spelling corrections are appreciated.
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |