This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: mutual recursive class


Hi

 Since you are only using class B in name in class A,
forward declaring class B should be enough.

Yours sincerely,

Bjorn

polux moon wrote:
> 
> How do you declare mutual recursiv class ?
> example:
> 

class B;

> class A{
> B* b;
> };
> 
> class B{
> A* a;
> };


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]