home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / lang / cplus / 18738 < prev    next >
Encoding:
Text File  |  1993-01-06  |  1.2 KB  |  36 lines

  1. Newsgroups: comp.lang.c++
  2. Path: sparky!uunet!usc!wupost!csus.edu!netcom.com!objsys
  3. From: Bob Hathaway <objsys@netcom.com>
  4. Subject: Vtbl and Ptr to Member Questions
  5. Message-ID: <1993Jan6.033329.4918@netcom.com>
  6. Keywords: vtables, PM, Pointer to Member
  7. Sender: objsys@netcom.com (Object Systems)
  8. Organization: Object Systems
  9. Date: Wed, 6 Jan 1993 03:33:29 GMT
  10. Lines: 24
  11.  
  12. Hello,
  13.  
  14. I have two C++ questions I would most appreciate an expert response to.
  15. First, (this looked wrong the first time I looked at it and it still does),
  16. on pg 235 of the ARM, Virtual Base Classes with Virtual Functions, shouldn't
  17. MW and BMW's vtbl look like:
  18.  
  19.   &BW::f  | delta(BW)    - 0
  20.   &MW::g  | 0        - 0
  21.   &BMW::h | 0        - 0
  22.   &W::k   | delta(W)    - 0
  23.  
  24. The rest look Ok, but was the above table in the ARM a typo?
  25.  
  26. Also, can a pointer to member (function) of any class be declared and if
  27. not (for lack of typechecking), whats the best (or least implementation
  28. dependent) workaround?  I'd like to avoid approaches such as those involving
  29. declarations and casting to functions with void * as the first parameter;
  30. but even establishing that this approach is as good as any other would be
  31. helpful, I think.
  32.  
  33. Thanks,
  34. bob
  35. objsys@netcom.com
  36.