home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / lang / cplus / 13372 < prev    next >
Encoding:
Text File  |  1992-09-08  |  1.4 KB  |  51 lines

  1. Path: sparky!uunet!gatech!bloom-beacon!eru.mt.luth.se!lunic!sunic!kth.se!news.kth.se!RICHARD
  2. From: RICHARD@CLYDE.ttt.kth.se
  3. Newsgroups: comp.lang.c++
  4. Subject: HELP: aggregate type question.
  5. Message-ID: <RICHARD.92Sep7210203@CLYDE.ttt.kth.se>
  6. Date: 7 Sep 92 20:02:03 GMT
  7. Sender: usenet@kth.se (Usenet)
  8. Organization: Department of TeleTransmission Theory
  9. Lines: 39
  10. Nntp-Posting-Host: clyde.ttt.kth.se
  11.  
  12.  
  13. I try to make a struct by inheriting from two other classes:
  14.  
  15.  
  16. struct Sequence {
  17.     Sequence () {}
  18. };
  19.  
  20. struct List : public Sequence {
  21.     List () {}
  22. };
  23.  
  24. struct Symbol {
  25.     virtual int X();
  26. };
  27.  
  28. struct Null : public Symbol, public List
  29. {
  30.     virtual int X();
  31. };
  32.  
  33. I compile with GCC 2.2.2, and it gives me the following error message:
  34.  
  35.     `List' fails to be an aggregate typedef.
  36.  
  37. on the line which starts with "struct Null".
  38.  
  39. First of all, I have no idea for now what an "aggregate typedef" is. Knowing
  40. would help a lot. No, I have not the ARM handy...
  41.  
  42. So please, tell me what I am doing wrong here...
  43.  
  44. --
  45. !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++!
  46. ! Richard Levitte, System manager       ! tel: int+46-8-790 64 23           !
  47. ! Royal Institute of Technology         ! fax: int+46-8-791 76 54           !
  48. ! Department of Teletransmition Theory  ! Internet: richard@ttt.kth.se      !
  49. ! S-100 44 Stockholm, Sweden            !                                   !
  50. !---------------------------------------------------------------------------!
  51.