home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / lang / cplus / 18947 < prev    next >
Encoding:
Text File  |  1993-01-11  |  1008 b   |  31 lines

  1. Newsgroups: comp.lang.c++
  2. Path: sparky!uunet!mcsun!hp4at!rcvie!rcsw50!se_rossb
  3. From: se_rossb@rcvie.co.at (Bernhard Rossboth)
  4. Subject: Re: why `int X: :X()' ?
  5. Message-ID: <1993Jan11.160139.23673@rcvie.co.at>
  6. Sender: news@rcvie.co.at
  7. Nntp-Posting-Host: rcsw50
  8. Reply-To: se_rossb@rcvie.co.at
  9. Organization: Alcatel ELIN Research
  10. References: <5501@miramon.lulea.trab.se>
  11. Date: Mon, 11 Jan 1993 16:01:39 GMT
  12. Lines: 17
  13.  
  14. In article 5501@miramon.lulea.trab.se, jbn@lulea.trab.se (Johan Bengtsson) writes:
  15. >Matt Wette (mwette@csi.jpl.nasa.gov) wrote:
  16. >
  17. >: Why are constructor and destructor functions usually declared to return
  18. >: ints when the usage typically warrents a `void' declaration.
  19. >
  20. >The "default int" rule does not apply to constructors and destructors.
  21. >You can't return an "int" from those functions.  You can't explicitly
  22. >mark them as procedures (void) either.
  23.  
  24. "No return type (not even void) can be specified for a constructor."
  25.  
  26. Ellis & Stroustrup: The Annotated C++ Reference Manual page 265.
  27.  
  28.  
  29.  
  30.  
  31.