Posted by Jonathan Short on April 22, 2001 at 19:14:41:
In Reply to: Re: help posted by Chris Stillwell on April 22, 2001 at 18:29:49:
I had the Exact same problem, and here's what I did.
say you declare a Browser.
Start in the Browser Header file. Then scroll down from the top, until you reach the first headerFile which you #included. Say it was
Now goto Herbovore.h, and scroll down from the top until you reach a header File, that you created. say #include "LifeForms.h"
Go to LifeForms.h and do same thing.
This is what in fact the compilier does.
only look through the header files.
if you come across a point where one header file calls another Header File, and that header File calls the one which called it, your at a point for Foward declaration. For Example.
"LifeForms.h" has #include "EcoSystem.h"
and "EcoSystem.h" has #include "LifeForms.h"
In this case a circular header problem arises.
That's most likely where your problem is.
Post a Followup