|
|
On 20/04/2012 03:15 PM, Warp wrote:
> Sounds like a rather complicated design. Anyways, you can declare classes
> (as opposed to defining them). In other words, you can do this:
>
> //----------------------------------------
> // This could be eg. in a "Y.hh" header file
> class X; // declaration of X
Ah, I see. This is the fact I was looking for. :-)
So this does... what? Tells the compiler "hey, this type exists, but I'm
not going to tell you anything about it"?
>>> (For obvious reasons. It would be an infinitely large class.)
>
>> It can if at least one of the classes refers to the other through a
>> pointer or a reference.
>
> It wouldn't be a member variable then.
What would it be then?
>> 1. Put class X and class Y in the same header file.
>
> Not necessary (and even if you put it in the same header file, that alone
> wouldn't solve your problem).
Quite right. That doesn't help at all...
Post a reply to this message
|
|