From: "A. Sinan Unur" Newsgroups: comp.os.msdos.djgpp Subject: Re: Try this one on for size Date: Thu, 17 Apr 1997 10:21:03 -0400 Organization: Cornell University Lines: 15 Sender: asu1 AT cornell DOT edu (Verified) Message-ID: <335631CF.1F90@cornell.edu> References: <199704162029 DOT QAA02720 AT hcst DOT net> <33546C31 DOT 6872 AT NO DOT SPAM DOT cs DOT com> Reply-To: asu1 AT cornell DOT edu NNTP-Posting-Host: 128 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk John M. Aldrich wrote: > > Imagine the > following: > > struct big_bad_struct *x; > x = malloc( sizeof(x) ); > > I leave it up to you to determine why this is wrong. ;) x = (struct big_bad_struct *) malloc (sizeof(big_bad_struct)); sorry, couldn't resist the temptation. -- sinan.