🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.os2.programmer
Article #3562

Re: malloc() and swapper.dat problems ....

#3562
From: Colin Jensen
Date: Sat, 23 Jan 1993 18:59
13 lines
1056 bytes
In article <1993Jan20.144643.9495@njitgw.njit.edu> dic5340@hertz.njit.edu (David Charlap) writes:
>In article <1993Jan19.154532.20484@solaris.rz.tu-clausthal.de> catd@rz.tu-clausthal.de writes:
>>   p = ( int *) malloc( sizeof(int)*120...0);
>
>The (int *) cast is unnecessary in ANSI-C.  malloc() returns a (void
>*) which is compatible with everything.

Unfortunately, the cast is neccesary in C++, so the cast should be used
for better portability.

-- 
Colin Jensen
ljensen@netcom.netcom.com	cjensen@ampex.com
Technical Details
Message-ID: <1993Jan23.185932.20991@netcom.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!think.com!sdd.hp.com!decwrl!csus.edu!netcom.com!ljensen
References: <1993Jan10.200412.454149@sue.cc.uregina.ca> <1993Jan19.154532.20484@solaris.rz.tu-clausthal.de> <1993Jan20.144643.9495@njitgw.njit.edu>

Show Full Headers
Complete Article Headers
Newsgroups: comp.os.os2.programmer
Path: arc1-ca.pugleaf.net!sparky!uunet!think.com!sdd.hp.com!decwrl!csus.edu!netcom.com!ljensen
From: ljensen@netcom.com (Colin Jensen)
Subject: Re: malloc() and swapper.dat problems ....
Message-ID: <1993Jan23.185932.20991@netcom.com>
Organization: Netcom - Online Communication Services (408 241-9760 guest)
References: <1993Jan10.200412.454149@sue.cc.uregina.ca> <1993Jan19.154532.20484@solaris.rz.tu-clausthal.de> <1993Jan20.144643.9495@njitgw.njit.edu>
Date: Sat, 23 Jan 1993 18:59:32 GMT
Lines: 13