home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / sys / mac / programm / 15475 < prev    next >
Encoding:
Text File  |  1992-09-14  |  1.6 KB  |  55 lines

  1. Xref: sparky comp.sys.mac.programmer:15475 comp.lang.c++:13647
  2. Path: sparky!uunet!spool.mu.edu!umn.edu!kksys.com!wd0gol!barker
  3. From: barker@wd0gol.WD0GOL.MN.ORG (Bob Barker)
  4. Newsgroups: comp.sys.mac.programmer,comp.lang.c++
  5. Subject: Possible bug in MPW C++ 3.2 with Handle-based classes
  6. Keywords: Macintosh, MPW C++
  7. Message-ID: <302@wd0gol.WD0GOL.MN.ORG>
  8. Date: 14 Sep 92 21:40:09 GMT
  9. Followup-To: poster
  10. Organization: Robert Barker & Associates, Eden Prairie, MN.
  11. Lines: 42
  12.  
  13. We are having a problem using Handle-based classes with MPW C++.
  14. If we have a forward declaration for a handle-based class, then actually
  15. declare the class as handle-based later on, the compiler thinks it's a 
  16. pointer-based class.  In the example below, class B has this problem.
  17.  
  18. Does anybody know of a fix or work-around for this problem?  We're in urgent
  19. need of a solution!  Any help or ideas would be very much appreciated!
  20.  
  21. ---------------------------- Example -------------------------------------
  22. class B;                // forward declaration of class B
  23.  
  24. // declaration of class A
  25. class A: public HandleObject {
  26.  
  27. public:
  28.         B *ClassBPtr;
  29.  
  30.         .
  31.         .
  32.         .
  33. };
  34.  
  35. //----- Later on -----
  36. class B: public A { 
  37.         .
  38.         .
  39.         .
  40. };
  41.  
  42. -------------------------------------------------------
  43. System Software:  System 7
  44. Hardware:  Macintosh IIsi
  45. MPW C++ Version:  3.2
  46. MPW Development Evironment:  3.2.3
  47.  
  48. Thanks!
  49.  
  50. -Bob Barker
  51. ------------------------------------------------------------------------------
  52. Bob Barker                                ...!uunet!umn-cs!tcnet!wd0gol!barker
  53. Robert Barker & Associates                                barker@wd0gol.MN.ORG
  54. (612) 949-0140
  55.