home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / lang / cplus / 11612 < prev    next >
Encoding:
Text File  |  1992-07-27  |  945 b   |  40 lines

  1. Newsgroups: comp.lang.c++
  2. Path: sparky!uunet!cs.utexas.edu!torn!watserv1!watmath!watmsg.waterloo.edu!pabuhr
  3. From: pabuhr@watmsg.waterloo.edu (Peter A. Buhr)
  4. Subject: Please Explain
  5. Message-ID: <1992Jul27.172122.23061@math.uwaterloo.ca>
  6. Sender: news@math.uwaterloo.ca (News Owner)
  7. Organization: University of Waterloo
  8. Date: Mon, 27 Jul 1992 17:21:22 GMT
  9. Lines: 29
  10.  
  11. Can anyone explain why I get this error from this program and if there is a
  12. work around? Please mail directly to me. Compiled with AT&T Cfront 3.0.
  13.  
  14. class fred {
  15.   protected:
  16.     int x;
  17.   public:
  18.     enum xxx { low, HIGH };
  19. };
  20.  
  21. class inbetween : private fred {
  22. };
  23.  
  24. class mary : public inbetween {
  25.   public:
  26.     fred::xxx jane( fred::xxx xp = fred::low ) {
  27.     return xp;
  28.     }
  29. };
  30.     
  31. cd /u/pabuhr/
  32. CC test.cc
  33. CC  test.cc:
  34. "test.cc", line 13: error:  mary cannot access low : fred  is a  private  base class
  35. 1 error
  36.  
  37. Compilation exited abnormally with code 1 at Mon Jul 27 13:11:23
  38.  
  39.  
  40.