home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / cplus / 19752 < prev    next >
Encoding:
Text File  |  1993-01-22  |  775 b   |  28 lines

  1. Path: sparky!uunet!olivea!news.bbn.com!tomlinso
  2. From: tomlinson@.bbn.com (Ray Tomlinson)
  3. Newsgroups: comp.lang.c++
  4. Subject: BC3.1 reject sts static array of undefined class
  5. Message-ID: <lm0344INNjd@news.bbn.com>
  6. Date: 22 Jan 93 15:02:28 GMT
  7. Organization: Bolt Beranek and Newman Inc., Cambridge, MA.
  8. Lines: 16
  9. NNTP-Posting-Host: pretzels.bbn.com
  10. Originator: tomlinso@pretzels.bbn.com
  11.  
  12.  
  13. The following code elicits an error from BC3.1.  I see nothing
  14. terribly wrong with it.
  15.  
  16. class X;    // declared in another file
  17.  
  18. class Y
  19. {
  20.     static const X x[];
  21. };
  22.  
  23. Produces the error: Error Y.CPP 8: Undefined structure 'X'
  24.  
  25. I'll grant that class X is undefined in this file, but so what?  In
  26. this case, Y::x will be defined and used in other files which have the
  27. full declaration of class X.
  28.