title: Defining a constructor that uses templates
body: <p>I'm trying my hand at templates, and thought I'd try to make a linked list using them. I've got a header file and a cpp file.</p>
  
  <p>Header file: </p>
  
  <pre><code>#ifndef LINKED_LIST_H
  #define LINKED_LIST_H
  
  template &lt;class T&gt;
  class Node {
      public:
          // Constructor and desconstructor
          Node&lt;T&gt;(T value);
          ~Node();
  
          // ---- Methods ----
          void add(T value);            // Add the value at the end of the list
          void add(T value, int index); //
  
          void remove(int index);  //
          void remove(T value); //
  
          bool     containts(T value); // Recursively check if our value it the supplied value
          Node&lt;T&gt;* at(int index);      // Return the Node at the given index
  
          int  size();  // Recursively get the size
  
          void print(); // Print the value and move to the next one
  
          Node* next;  // Next Node in the list
          T     value; // Value of the Node
  };
  
  template &lt;class T&gt;
  class LinkedList {
      public:
          // Constructor and deconstructor
          LinkedList&lt;T&gt;();
          ~LinkedList&lt;T&gt;();
  
          // ---- Methods ----
          void add(T value);            // Add a new Node at the end of the list with value
          void add(T value, int index); // Add a new Node at the given index of the list with value
  
          void remove(int index); // Remove the Node at the given index
          void remove(T value);   // Remove any Nodes with the given value
  
          bool     contains(T value);     // If the List contains the supplied value
          Node&lt;T&gt;* operator[](int index); // Node at the specified index
  
          int  size();  // Returns the number of Nodes in the list
          bool empty(); // What do you think this does?
  
          void print(); // Prints all the values in the List
  
      private:
          Node&lt;T&gt;* head;   // The top of the List
          Node&lt;T&gt;* latest; // Latest Node added
  };
  
  #endif
  </code></pre>
  
  <p>In my .cpp file, I try to define the Node's constructor using</p>
  
  <pre><code>#include "LinkedList.h"
  
  template&lt;class T&gt; Node&lt;T&gt;::Node&lt;T&gt;(T value) {
  
  }
  </code></pre>
  
  <p>However, on compilation I get this error: </p>
  
  <blockquote>
    <p>./src/Util/LinkedList.cpp:3:19: error: 'Node::Node' names the constructor, not the type
     template Node::Node(T value) {
                       ^
    ./src/Util/LinkedList.cpp:3:19: error: and 'Node' has no template constructors</p>
  </blockquote>
  
  <p>I shouldn't be defining the type should I? Since it's a template? Sorry if this is formatted badly, this is my first time using stack overflow.</p>