home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / lang / cplus / 12940 < prev    next >
Encoding:
Text File  |  1992-08-26  |  1.4 KB  |  38 lines

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