foward declarations


[ Follow Ups ] [ Post Followup ] [ CS2704 Web Discussion Board ] [ FAQ ]

Posted by Mike Haggerty on April 15, 2001 at 23:36:31:

ok...i got this part so far. if we have two classes that need to know about each other, we say:

class1 header file:

class class2;

class class1 {
class2* foo;
};

class2 header file:

class class1;

class2 {
class1* foo2;
};

my question is about the #includes. do we #include "class2.h" in the class1 header file and vice versa? mine somehow doesnt work when i do this.



Follow Ups:



Post a Followup

Name:
E-Mail:

Subject:

Comments:

Optional Link URL:
Link Title:
Optional Image URL:


[ Follow Ups ] [ Post Followup ] [ CS2704 Web Discussion Board ] [ FAQ ]