Error when using inheritance and templates
<p>I have a Base class gameCore that is a parent to a subclass takeaway.</p>

<p>The Base class is a templated class and is held all within a header file.</p>

<p>I keep getting these errors when i try to make the subclass inheret from the base.</p>

<p>I know it has something to do with using templates and inheritance.I just can't figure out 
what exactly im doing wrong</p>

<p>I have looked everywhere for a solution and have seen other people with the same problem,
so i figured maybe there is something specefic to my code.</p>

<pre><code>takeaway.h:7: error: expected template-name before '&lt;' token
takeaway.h:7: error: expected '{' before '&lt;' token
takeaway.h:7: error: expected unqualified-id before '&lt;' token
takeaway.cpp:38: error: expected template-name before '&lt;' token
takeaway.cpp:38: error: expected '{' before '&lt;' token
takeaway.cpp:38: error: expected unqualified-id before '&lt;' token
</code></pre>

<p>This is the cpp file for takeaway </p>

<pre><code>*/
#include "takeaway.h"
template &lt;class Position&gt; 
class takeaway: public gameCore&lt;Positions&gt;  // Line 38   &lt;---------------
{
private:

 public:
 /*
 Description:Creates a initial array
 return : an array of data
 */
 int * initialData(int initial){

   int theScore = score(initial);
   int final;
   if(initial ==0)
   {
    final = 1;
   }
   else
   {
    final = 0;
   }
   int returnData[2] = {theScore,final};
   return returnData;
 }
</code></pre>

<p>The header file for takeaway</p>

<p>GNU nano 2.2.2                    File: takeaway.h</p>

<pre><code>#ifndef _TAKEAWAY_H
#define _TAKEAWAY_H
#include&lt;map&gt;
#include&lt;cctype&gt;
#include&lt;stack&gt;
#include&lt;map&gt;
#include&lt;iostream&gt;
#include&lt;string&gt;
using namespace std;
template &lt;class Position&gt; 
class takeaway : public gameCore&lt;Position&gt; // this is line 7  &lt;------------------
{
 private:

 public:
   bool isNum(string str);
   int * initialData(int initial);
   int score(int position);
   stack&lt;int&gt; addStack(int currentPos, stack&lt;int&gt; possiblePositions);
   takeaway(int initial);
   ~takeaway();
 };

 #endif
</code></pre>

<p>Here is a snippet from from the gameCore.h file note that after public: there is alot of code that is implemented right in the header file (because thats the only way you can use templates? at least thats what i was told)</p>

<pre><code>template &lt;class Position&gt;
class gameCore
{
 protected:
        //Best Move used by algorithim
        Position bestMove;
        //The current highest score used by the algorithim
        int highestScore ;
        //Stack to be used to remmeber what move created the score
        stack&lt;Position&gt; movedFrom;
        //Stack used for the algorithim.
        stack&lt;Position&gt; curWorkingPos;
        //The actual Map that the data will be held in.
        map&lt;Position,int[2]&gt; gamesMap;
 public:
</code></pre>
