From: gfoot AT mc31 DOT merton DOT ox DOT ac DOT uk (George Foot) Newsgroups: comp.os.msdos.djgpp Subject: Re: DJGPP Structs Date: 3 Mar 1997 16:57:11 GMT Organization: Oxford University Lines: 19 Message-ID: <5fevt7$qpj@news.ox.ac.uk> References: <01bc2673$a4dbe420$8e54dec2 AT satan> <5fdmdn$mn8 AT freenet-news DOT carleton DOT ca> NNTP-Posting-Host: mc31.merton.ox.ac.uk To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Paul Derbyshire (ao950 AT FreeNet DOT Carleton DOT CA) wrote: : Also: no typecast is needed to assign the result of a malloc or calloc to : a pointer. : int *bunch_of_ints; : bunch_of_ints=malloc (3000*sizeof(int)); : will work just as well as : int *bunch_of_ints; : bunch_of_ints=(int *)malloc (3000*sizeof(int)); Not quite true. Both work equally well in (non-ANSI) C, but only the latter is compliant with ANSI C regulations (and hence C++). -- George Foot Merton College, Oxford.