includes in header files and forward declarations

Boudewijn Rempt boud at valdyas.org
Mon Jan 19 15:46:58 CET 2004


On Monday 19 January 2004 15:28, Patrick Julien wrote:

> I'm not sure what you are talking about?  What does the Quanta HACKING file
> say?

13. Avoid inclusions in header files. Use forward declarations instead, like:
   Header file:
     class Foo;
     class Foo2{
       Foo* m_foo;
     }
   Implementation file:
     #include "foo.h"

>
> I prefer forward declarations to answer your question tho.
>

Okay -- I will try to do that.
-- 
Boudewijn Rempt | http://www.valdyas.org/fading/index.cgi


More information about the kimageshop mailing list