home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / lang / cplus / 17844 < prev    next >
Encoding:
Text File  |  1992-12-11  |  1015 b   |  23 lines

  1. Newsgroups: comp.lang.c++
  2. Path: sparky!uunet!microsoft!hexnut!jimad
  3. From: jimad@microsoft.com (Jim Adcock)
  4. Subject: Re: static members in derived classes
  5. Message-ID: <1992Dec11.215549.5122@microsoft.com>
  6. Date: 11 Dec 92 21:55:49 GMT
  7. Organization: Microsoft Corporation
  8. References: <1g7c8fINNdhf@horus.ap.mchp.sni.de> <Bz20Gt.29x@cs.uiuc.edu>
  9. Lines: 12
  10.  
  11. In article <Bz20Gt.29x@cs.uiuc.edu> pjl@cs.uiuc.edu (Paul Lucas) writes:
  12. |>We don't understand this behavior of C++. Can anyone explain to us.
  13. |
  14. |******>    What's to understand?  That's the way it is.  What you're describing
  15. |    are "class instance varaibles" in Smalltalk; C++ has no equivalent.
  16.  
  17. The equivalent in C++ is to provide one or more virtual functions that
  18. give access to the class-specific information.  It's certainly true
  19. that C++ provides no built-in support for class instance behaviors --
  20. you have to write the code yourself.  At least until runtime type identification
  21. is adopted.  Then at least some of the common requirements will be built-in.
  22.  
  23.