home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!cbnews!cbnewsl!psrc
- From: psrc@pegasus.att.com (Paul S.R. Chisholm)
- Subject: Re: a few rookie questions about testing for CLASSS membership.
- Reply-To: psrc@pegasus.att.com (Paul S.R. Chisholm)
- Organization: AT&T Bell Laboratories
- Distribution: na
- Date: Thu, 27 Aug 1992 00:54:22 GMT
- Message-ID: <1992Aug27.005422.27011@cbnewsl.cb.att.com>
- References: <1992Aug25.204448.15682@cs.wisc.edu>
- Sender: psrc@cbnewsl.cb.att.com (Paul S. R. Chisholm)
- Lines: 24
-
- In article <1992Aug25.204448.15682@cs.wisc.edu> you write:
- >I'm a relative rookie to C++, though not to OOP (due to many moons of
- >programming in Objective-C).
-
- It shows.
-
- >1. I have a pointer p to some object. How do I test if p is a member
- >of the CLASS a.
-
- There's no way in C++ to do this. Such run-time information isn't
- generated by the compiler. (You can put it in yourself, if you want
- to, but not trivially.)
-
- >2. Is there a way to test if p, which is a pointer to an object, can
- >test if p can execute method m?
-
- See previous answer.
-
- >Bill Roth, University of Wisconsin Computer Sciences Dept.
- >Internet: roth@cs.wisc.edu. BITNET: ROTH@WISCPSL. HEPNET: PSL::ROTH
-
- Paul S. R. Chisholm, AT&T Bell Laboratories/EasyLink Services,
- att!pegasus!psrc, psrc@pegasus.att.com, AT&T Mail !psrchisholm
- I'm not speaking for the company, I'm just speaking my mind.
-