From: "doug" Newsgroups: comp.os.msdos.djgpp Subject: Re: new vs malloc Date: 19 Feb 2000 13:44:37 GMT Organization: none Lines: 14 Message-ID: <01bf7ba9$8fb5a980$c3247d81@default> References: <38AD8622 DOT AE067F97 AT tiscalinet DOT it> <004101bf7a97$06ff2ca0$cff0fea9 AT stevenhe> <88lt6e$9pj$1 AT nets3 DOT rz DOT RWTH-Aachen DOT DE> NNTP-Posting-Host: client36-195.oprit.rug.nl X-Trace: info.service.rug.nl 950967877 16921 129.125.36.195 (19 Feb 2000 13:44:37 GMT) X-Complaints-To: newsmaster AT rug DOT nl NNTP-Posting-Date: 19 Feb 2000 13:44:37 GMT X-Newsreader: Microsoft Internet News 4.70.1155 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com > In a nutshell: if you write C++, use new. If you write C, use > malloc(), and *don't* cast the return value, as it will actually hide > potential problems, instead of fixing any. Can you give me an example. I like my C programs to compile with as few warnings as possible, even if they are compiled as C++ and I cast the returned value from malloc to achieve this. Can you give me an example of where this casting may cause problems in a C program? Thank you, Doug Eleveld