Forward declare classes, class redefinition
<p>So i have 2 classes let's call it class A and B which inside of those classes have a reference for each other as a function's arguments. When i try to forward declare it like this:</p>

<pre><code>// A.h (Header guarded)
namespace ns {
    class B { // Attempt to forward declare B
    public:
        int getRand();
    };

    class A {
    public:
        float a, b;

        void aFunc(B &amp;b);       
    };
}
</code></pre>

<hr>

<pre><code>// B.h (Header guarded)
namespace ns {
    class A { // Attempt to forward declare A
    public:
        float a, b;
    };

    class B {
    public:
        void bFunc(A &amp;a);
        int getRand();
    };
}
</code></pre>

<hr>

<p>The thing is, when i do this i got <code>'class' type redefinition</code> error. I've been searching for the solution and still haven't came to a solution. Am i doing this right? Which i suppose i'm not, can you tell me where did i do wrong here?</p>