| www.delorie.com/djgpp/mail-archives/browse.cgi | search |
| From: | "Riley" <hitzl AT usa DOT net> |
| Newsgroups: | comp.os.msdos.djgpp |
| Subject: | Re: Help with class "chicken or the egg" problem |
| Date: | Mon, 16 Feb 1998 14:15:31 -0800 |
| Organization: | AT&T WorldNet Services |
| Lines: | 34 |
| Message-ID: | <6cadnj$2ub@bgtnsc02.worldnet.att.net> |
| References: | <6c99k6$1u6 AT bgtnsc02 DOT worldnet DOT att DOT net> <Pine DOT OSF DOT 3 DOT 91 DOT 980216121910 DOT 29538D-100000 AT leofric> |
| NNTP-Posting-Host: | 153.37.66.186 |
| To: | djgpp AT delorie DOT com |
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
>I think you just need to declare one class name like so:
>
>class B;
>
>then define them:
Well, that fixed the problem in that program but in my actual program, I
still get the error "world.h:22: field `m_pTilesBase' has incomplete type".
The code (in world.h -- some stuff snipped):
class Tile;
class World
{
public:
World();
~World();
private:
Tile *m_pTilesBase[][];
Tile *m_pTilesFringe[][];
Tile *m_pTilesObject[][];
};
I'm not sure if the problem is with the multiple source files or because
they are pointers to arrays.
Thanks,
Riley
hitzl AT usa DOT net
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |