----- Original Message -----
From: "Thomas Dodd" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Monday, February 24, 2003 8:20 AM
Subject: C++


> I had a question for a C++ programmer. Thought I might find one here :)
>
>
> I have 2 classes that need to reference each other.
>
> "headerA.h"
  class B;
> class A{
> public:
>    int x;
>    int y;
>    B *left;
>    B *right;
> }
>
> "headerB.h"
  class A;
> class B{
> public:
>    int a;
>    int b;
>    A *parent;
>    char foo();
> }

Then the pointers will work. Of course, the .cpp files will have to include
each other's headers.
{^_^}



-- 
Psyche-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/psyche-list

Reply via email to