Re: C++

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



----- Original Message -----
From: "Thomas Dodd" <ted@cypress.com>
To: <psyche-list@redhat.com>; <redhat-devel-list@redhat.com>;
<mozilla-builds@mozilla.org>
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
Psyche-list@redhat.com
https://listman.redhat.com/mailman/listinfo/psyche-list

[Index of Archives]     [Fedora General Discussion]     [Red Hat General Discussion]     [Centos]     [Kernel]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Red Hat 9]     [Gimp]     [Yosemite News]

  Powered by Linux