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