home *** CD-ROM | disk | FTP | other *** search
/ Black Box 4 / BlackBox.cdr / progc / fixed300.arj / PUG226.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1991-06-01  |  924 b   |  53 lines

  1. #if 0
  2. From: Joseph Puglielli, Crandell Dev Corp, 805-962-1199
  3. Subject: compiling with Rational stuff will give General Protection Fault
  4. Status: Fixed in 3.0
  5. #endif
  6.  
  7. /*  pug226.cpp
  8.     Boston, Michael LaRosa, Feb 26 91
  9. */
  10.  
  11. class value
  12. {   // can have data members.
  13. public:
  14.     value & operator = (char w);  //this is needed
  15. };
  16.  
  17.  
  18. value& value::operator = (char w)
  19. {   return (*this);  }
  20.  
  21.  
  22. class coord
  23. {
  24.     value  spam;  // this line needed.
  25. };
  26.  
  27.  
  28. class coordstack
  29. {
  30. private:
  31.     coord *stack;
  32. public:
  33.     int push(void);
  34. };
  35.  
  36.  
  37. int  coordstack::push(void)  // body needed
  38. {
  39.     *(stack) = *(stack);  //This line needed
  40.     return (0);
  41. }
  42.  
  43.  
  44.  
  45. /*Gives following error:
  46.     ztcpp1r pug226.cpp
  47.  
  48. DOS/16M: [35] General Protection Fault at 0080:6D6E in ZTCPP1R.EXE
  49. code=0000 ss=00B8 ds=00A0 es=0000
  50. ax=0818 bx=0000 cx=0800 dx=00C0 sp=9A06 bp=9A54 si=02AE di=02AE
  51. --- errorlevel 255
  52. */
  53.