Article View: att.lang.c++
Article #263Re: The brother pointer gives me a headache
From: Martijn Lievaart
Date: Tue, 17 Feb 1998 00:00
Date: Tue, 17 Feb 1998 00:00
16 lines
1378 bytes
1378 bytes
Dann Corbit wrote in message <6casd1$4s2$1@client2.news.psi.net>...
>
> cout << "Wait..." << endl; // missing semicolon. Flush with endl...
> // USE new[] NOT malloc() FOR C++ !!!
> // YOU WOULD PROBABLY HAVE AVOIDED THIS BLUNDER.
> if ((num = (long *) malloc(10000000 * sizeof(int))) == NULL) { //
>sizeof...
hm, this will not work on platforms where sizeof(int) != sizeof(long).
Should read
if ((num = (long *) malloc(10000000 * sizeof(long))) == NULL) {
Martijn (mlievaar(at)orion(dot)nl)
Technical Details
Message-ID:
<6cbq50$9fk$1@news2.xs4all.nl>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<01bd3b40$c55acd50$a080fac3@johnpanoid> <6casd1$4s2$1@client2.news.psi.net>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 108b44,7b57483de3649335 X-Google-Attributes: gid108b44,public X-Google-Thread: 10d4ba,7b57483de3649335 X-Google-Attributes: gid10d4ba,public X-Google-Thread: 109fba,7b57483de3649335 X-Google-Attributes: gid109fba,public From: "Martijn Lievaart" <mlievaar@orion.nl> Subject: Re: The brother pointer gives me a headache Date: 1998/02/17 Message-ID: <6cbq50$9fk$1@news2.xs4all.nl> X-Deja-AN: 325834868 Sender: martijnl@ois.orion.nl References: <01bd3b40$c55acd50$a080fac3@johnpanoid> <6casd1$4s2$1@client2.news.psi.net> X-XS4ALL-User: martijnl@xs4all.nl on ois.orion.nl X-XS4ALL-Date: Tue, 17 Feb 1998 11:52:16 CET X-MimeOLE: Produced By Microsoft MimeOLE V4.71.1712.3 Organization: XS4ALL, networking for the masses Newsgroups: att.lang.c++,comp.lang.c++,comp.sys.lang.c++