home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / gnu / g / help / 1451 < prev    next >
Encoding:
Text File  |  1992-11-17  |  1.8 KB  |  46 lines

  1. Newsgroups: gnu.g++.help
  2. Path: sparky!uunet!stanford.edu!agate!spool.mu.edu!sgiblab!munnari.oz.au!bunyip.cc.uq.oz.au!dlovell
  3. From: dlovell@elec.uq.oz.au (David Lovell)
  4. Subject: ANSI C++ forbids array size in vector delete
  5. Message-ID: <dlovell.722072326@s1.elec.uq.oz.au>
  6. Keywords: g++
  7. Sender: news@bunyip.cc.uq.oz.au (USENET News System)
  8. Organization: Prentice Centre, University of Queensland
  9. Date: Wed, 18 Nov 1992 07:38:46 GMT
  10. Lines: 34
  11.  
  12. Hi there,
  13. We've just put the latest releases of gcc and libg++ up and now I'm bashing
  14. some old code into shape. I know this is only a warning message but I'd like
  15. to know how to get rid of it (apart from turning all the warnings off!).
  16.  
  17. The message in question has the form:
  18. matrix.C:63: warning: ANSI C++ forbids array size in vector delete
  19.  
  20. where matrix.C:63 is:
  21. delete [storage] store;
  22.  
  23. where store is allocated by:
  24. store = new double [storage];
  25.  
  26. Am I right to assume that C++ no longer needs "array size in vector delete"?
  27. I just bought a "recent" (1991) C++ text, "C++: the Complete Reference" by
  28. Herbert Schildt which says at the top of page 334
  29.  
  30. "When an array allocated by using new is released, delete must be told how
  31. many elements there are in the array."
  32.  
  33. Which poses the question, which C++ reference should GNU users refer to?
  34. Thanks in advance for all your helpful replies.
  35.  
  36. David
  37. -------------------------------------------------------------------------------
  38. David Lovell - dlovell@s1.elec.uq.oz.au  |
  39.                                          |
  40. Dept. Electrical Engineering             | "Oh bother! The pudding is ruined
  41. University of Queensland                 | completely now!" said Marjory, as
  42. BRISBANE 4072                            | Henry the daschund leapt up and
  43. Australia                                | into the lemon surprise.
  44.                                          |
  45. tel: (07) 365 3564                       |
  46.