Can't solve error with file including header that includes itself using header guards
<p>I have a header file named Application.h where I include a header named CollisionHandler.h. CollisionHandler includes Application.h, so I get a too many includes error when compiling. To solve this I've put the CollisionHandler include between header guards, like this:</p>

<pre><code>#ifndef COLLISION_HANDLER_INCLUDED_H
#define COLLISION_HANDLER_INCLUDED_H
#include "CollisionHandler.h"
#endif
</code></pre>

<p>but when I try to use a object of type CollisionHandler (this class is defined in CollisionHandler.h, between header guards) as a member variable of the Application class (which is also defined between header guards in Application.h), I get this error repeated for every file that includes Application.h (5 times or so):</p>

<pre><code>1&gt;c:\users\aitor\documents\visual studio 2008\projects\copter\copter\application.h(19) : error C2143: syntax error : missing ';' before '*'
1&gt;c:\users\aitor\documents\visual studio 2008\projects\copter\copter\application.h(19) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1&gt;c:\users\aitor\documents\visual studio 2008\projects\copter\copter\application.h(19) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
</code></pre>

<p>The line 19 is the line where I declare the CollisionHandler object as a member variable.</p>

<p>Here is the code in Application.h (With the relevant lines idented):</p>

<pre><code>#include "Header.h"
#include &lt;stdio.h&gt;
#include "GameCharter.h"
#include &lt;vector&gt;
#include &lt;boost/shared_ptr.hpp&gt;
    #ifndef COLLISION_HANDLER_INCLUDED_H //Here I include
    #define COLLISION_HANDLER_INCLUDED_H //the collision
    #include "CollisionHandler.h"        //handler header
    #endif
using namespace std;
#ifndef APPLICATION_DEFINED_H
#define APPLICATION_DEFINED_H
class LimitsManager;
class ObstacleManager;
class Application
{
public:
         CollisionHandler *handler; //Here I declare the CollisionHandler
    ObstacleManager *obstacleManager;
    LimitsManager *limitsManager;
    vector&lt;boost::shared_ptr&lt;GameChar&gt; &gt; characters;
    vector&lt;int&gt; idsToRemove;
    void gameLoop();
    Application();
    bool idsNeedUpdate;
    bool objectsNeedToRemove;
};
#endif
</code></pre>

<p>And this is the code for CollisionHandler.h:</p>

<pre><code>#include "Header.h"
#include "Application.h" 
#include "GameCharter.h"
#include "LimitObstacle.h"
#ifndef COLLISION_HANDLER_H
#define COLLISION_HANDLER_H
class CollisionHandler
{
    Application *app;
public:
    void handleCollisions();
    CollisionHandler()
    {

    }
    CollisionHandler(Application *app);
    bool collidersAreCollidingGeneral(GameChar* char1,GameChar* char2);
    bool collidersAreCollidingSecondary(GameChar* char1,GameChar* char2);
};
#endif
</code></pre>

<p>Also, if I use <code>class CollisionHandler;</code> in Application.h and then include CollisionHandler.h in the cpp file, it works</p>
