title: Not a class, namespace, or enumeration after making a template class?
body: <p>I am attempting to templatize a few classes (LinkedListNode and LinkedList), such that</p>
  
  <pre><code>template &lt;class T&gt;
  class LinkedListNode{
      public:
          T data;
          LinkedListNode *next;
          LinkedListNode();
  };
  </code></pre>
  
  <hr>
  
  <p>In my LinkedList Class, I have private variables:</p>
  
  <pre><code>private:
      LinkedListNode *head;
      //iterator for traversing the list
      LinkedListNode *current;
  </code></pre>
  
  <p>};</p>
  
  <p>When compiling, I am getting strange errors:</p>
  
  <blockquote>
    <p>./LinkedList.h:38:3: error: unknown type name 'LinkedListNode'; did you mean
          'LinkedList'?
                    LinkedListNode *head;
                    ^~~~~~~~~~~~~~
                    LinkedList
    ./LinkedList.h:13:7: note: 'LinkedList' declared here
    class LinkedList{
          ^
    ./LinkedList.h:40:3: error: unknown type name 'LinkedListNode'; did you mean
          'LinkedList'?
                    LinkedListNode *current;
                    ^~~~~~~~~~~~~~
                    LinkedList
    ./LinkedList.h:13:7: note: 'LinkedList' declared here
    class LinkedList{
          ^
    LinkedList.cpp:7:1: error: 'LinkedListNode' is not a class, namespace, or
          enumeration
    LinkedListNode::LinkedListNode(){
    ^
    ./LinkedList.h:5:7: note: 'LinkedListNode' declared here
    class LinkedListNode{
          ^</p>
  </blockquote>
  
  <p>Why am i getting these errors if it says my LinkedListNode is also being declared?</p>