What do you mean by bug? You will get a semantic error because you use a class that has not been declared (which class depends on which of the headers you include in a c/cpp file).
Write a class forward declaration before declaring the class in each file and it should work. If you do you don't even have to include the header of the other class, just make sure to not write any declarations or inline code that depends on knowing the complete type of the other class.
i.e.
//in "one.h"#ifndef _ONE_ #define _ONE_ class two; class one{ public: one(); private: two* m_two;};#endif
//in "two.h"#ifndef _TWO_ #define _TWO_ class one; class two{ public: two(); private: one* m_one;};#endif
Edited by - Dactylos on October 18, 2001 4:47:44 PM