RE: [Dev-C++] Deliberate crashes - more information
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Ioannis V. <no...@ho...> - 2002-04-08 23:41:00
|
Yes and to clarify the issue more here what is written in "The C++ Programming Language" 3rd Edition or Special Edition by Bjarne Stroustrup (the creator of C++) (this is the Bible of C++): On page 128: "The delete operator may be applied only to a pointer returned by new or to zero. Applying delete to zero has no effect". And for delete[] some lines down: "Applying delete[] to zero has no effect". But in general you should know whether the pointer points to allocated memory or not. And for bullet-proof code try using the C++ containers instead. Ioannis * Ioannis Vranos * Programming pages: http://www.noicys.cjb.net <http://www.noicys.cjb.net/> * Alternative URL: http://run.to/noicys -----Original Message----- From: dev...@li... [mailto:dev...@li...] On Behalf Of Bob Wilson Sent: Monday, April 08, 2002 11:46 PM To: Dev-C++ User Mailing List Subject: [Dev-C++] Deliberate crashes - more information Ladies and gentlemen: Earlier I posted an lengthy "treatise" on problems related to quote from Sams Teach Yourself C++ in 24 Hours, third Edition by Jesse Liberty. Since that posting I have exchanged several lengthy emails with the author concerning what I perceived as a problem with the wording of his warning. During the corse of the day, I believe we have come to an understanding. Mr. Liberty has asked that I inform the readers of the Dev-C++ User Mailing List of the results of this discussion. He was concerned that my comments would make people think that he had "got this wrong." To that end, I am forwarding the entire thread of our correspondance in reverse cronological order. |