title: missing template arguments before '*' token
body: <p>having difficulty getting the main method to compile.
  The error is on line 10:  </p>
  
  <pre><code>missing template argument before * token.
  myChain was not  declared  in this scoop
  expected type-specifier before 'chain'
  expected ';' before 'chain'
  </code></pre>
  
  <p>Below is the code where the error occurs.</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include "chain.h"
  #include "IOcode.h"
  #include "chainNode.h"
  
  using namespace std;
  
  int main (){
  
      chain *myChain=new chain(10);
      userInputOutput(myChain, "chain");
  }
  </code></pre>
  
  <p>chainNode.h dependency</p>
  
  <pre><code>#ifndef chainNode_
  #define chainNode_
  
  template &lt;class T&gt;
  struct chainNode 
  {
     // data members
     T element;
     chainNode&lt;T&gt; *next;
  
     // methods
     chainNode() {}
     chainNode(const T&amp; element)
        {this-&gt;element = element;}
     chainNode(const T&amp; element, chainNode&lt;T&gt;* next)
        {this-&gt;element = element;
         this-&gt;next = next;}
  };
  
  #endif
  </code></pre>
  
  <p>chain.h dependency
  class definition for chain.</p>
  
  <pre><code>#ifndef chain_
  #define chain_
  
  #include&lt;iostream&gt;
  #include&lt;sstream&gt;
  #include&lt;string&gt;
  #include "linearList.h"
  #include "chainNode.h"
  #include "myExceptions.h"
  
  class linkedDigraph;
  template &lt;class T&gt; class linkedWDigraph;
  
  template&lt;class T&gt;
  class chain: public linearList
  {
     friend class linkedDigraph;
     friend class linkedWDigraph&lt;int&gt;;
     friend class linkedWDigraph&lt;float&gt;;
     friend class linkedWDigraph&lt;double&gt;;
     public:
        // constructor, copy constructor and destructor
        chain(int initialCapacity = 10);
        chain(const chain&lt;T&gt;&amp;);
        ~chain();
  
        // ADT methods
        bool empty() const {return listSize == 0;}
        int size() const {return listSize;}
        T&amp; get(int theIndex) const;
        int indexOf(const T&amp; theElement) const;
        void erase(int theIndex);
        void insert(int theIndex, const T&amp; theElement);
        void output(ostream&amp; out) const;
  
     protected:
        void checkIndex(int theIndex) const;
              // throw illegalIndex if theIndex invalid
        chainNode&lt;T&gt;* firstNode;  // pointer to first node in chain
        int listSize;             // number of elements in list
  };
  </code></pre>
  
  <p>IOcode.h dependency</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include "linearList.h"
  
  using namespace std;
  
  void userInputOutput (linearList* l, string dataStructure);
  </code></pre>