abstract method in namespace
<p>i have quite strange problem.</p>

<p>I have 3 files:<br>
figure.h:</p>

<pre><code>#ifndef FIGURE_H
#define FIGURE_H
namespace figure
{
    class figure
    {
        public:
            figure(position &amp;p,color c);
            virtual bool canMove(const position &amp;p)=0;
            virtual bool move(const position &amp;p)=0;
        protected:
            color col;
            position &amp;p;
    };
    class king : public figure
    {
    };
};
#endif // FIGURE_H
</code></pre>

<p>king.h:</p>

<pre><code>#ifndef KING_H
#define KING_H

#include "./figure.h"
namespace figure
{
   class king : protected figure
   {
   };
}
#endif // KING_H
</code></pre>

<p>and king.cpp:</p>

<pre><code>#include "king.h"
bool figure::king::canMove(const position &amp;p)
{
}
</code></pre>

<p>I'm compiling it with:
gcc -std=c11 -pedantic -Wall -Wextra</p>

<p>but the problem is that i got this error:</p>

<blockquote>
  <p>/src/figure/figure.h:24:45: error: no ‘bool
  figure::king::canMove(const position&amp;)’ member function declared in
  class ‘figure::king’</p>
</blockquote>

<p>What should I do?
Thank you very much!</p>
