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