From: "doug" Newsgroups: comp.os.msdos.djgpp Subject: Re: new vs malloc Date: 20 Feb 2000 01:11:52 GMT Organization: none Lines: 19 Message-ID: <01bf7c09$95c48f20$ad247d81@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> <01bf7ba9$8fb5a980$c3247d81 AT default> <38aebc31 DOT 19427507 AT news DOT btx DOT dtag DOT de> NNTP-Posting-Host: client36-173.oprit.rug.nl X-Trace: info.service.rug.nl 951009112 2938 129.125.36.173 (20 Feb 2000 01:11:52 GMT) X-Complaints-To: newsmaster AT rug DOT nl NNTP-Posting-Date: 20 Feb 2000 01:11:52 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 Horst Kraemer schreef in artikel <38aebc31 DOT 19427507 AT news DOT btx DOT dtag DOT de>... > On 19 Feb 2000 13:44:37 GMT, "doug" wrote: > In C++ you have no option because you always have to cast explicitly. > The stdlib problem doesn't exist in C++ because in C++ it is an error > to call malloc without #including stdlib, while it is permitted in C. Ok, thanks. I had thought that it might be more serious than that for me. I always compile with -W and -Wall to get lots of warnings and lately I've even used a of -Wpedantic. Then I make sure to resolve absolutely every warning that I can. So I will get an explicit warning about forgetting to include stdlib. When I fix that then everything should be OK, even if I do cast the return from malloc. Thanks, Doug Eleveld