Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!killer!texbell!bellcore!faline!thumper!ulysses!andante!alice!ark From: ark@alice.UUCP (Andrew Koenig) Newsgroups: comp.lang.c Subject: Re: malloc() and sizeof Message-ID: <9146@alice.UUCP> Date: 3 Apr 89 21:18:30 GMT References: <510@lakesys.UUCP> Distribution: usa Organization: AT&T Bell Laboratories, Liberty Corner NJ Lines: 10 I have found the following style useful: #define new(T) ((T *) malloc (sizeof (T))) struct Foo *fp = new(struct Foo); This is, of course, reminiscent of C++. -- --Andrew Koenig ark@europa.att.com