title: How to initialize pointers in a linked list to templated class to NULL in constructor implemented in header file
body: <p>Hello I am working on a project for data structures and I am stuck. 
  The project is to build a templated linked list class and a nested iterator class, inside a headerfile only. I do not understand how to use the iterator class inside of the templated LinkedList class. I am not sure about iterators in general. The methods declared are all needed to run the tests that will be ran. I am currently stuck on initializing 'LinkedList* prev' and next in the constructor. Please help! How do I initialize something that is templated? the compiler wants to know what data type I think? Thanks for your time
  The error is on the constructor declaration in the class LinkedList 
  EDITED "invalid initialization of non-const reference of type 'std::basic_string char&amp;' from an rvalue of type 'int'" is the error message</p>
  
  <pre><code>#ifndef LINKEDLIST_H_
  #define LINKEDLIST_H_
  #include &lt;iostream&gt;
  #include &lt;string&gt;
  #include &lt;cstdlib&gt;
  using namespace std;
  template &lt;typename T&gt; class  LinkedList
  {
  
      private:
          LinkedList&lt;T&gt;* head;
          int size;
          T element = NULL;
          LinkedList&lt;T&gt;* prev;
          LinkedList&lt;T&gt;* next;
      public:
  
  
          class Iterator
          {
                  friend class LinkedList&lt;T&gt;;
              private:
  
              public:
                  Iterator();
                  T operator*() const;
                  Iterator&amp; operator++();
                  bool operator==(Iterator const&amp; rhs);
                  bool operator!=(Iterator const&amp; rhs);
          };
  
          LinkedList&lt;T&gt;():prev(0), next(0){} //HERE is the ERROR????////////
          Iterator begin() const
          {
   //         Iterator tempIterator = LinkedList&lt;T&gt;();
  //
  //          return tempIterator-&gt;front;
              return NULL;
          }
          Iterator end() const{return NULL;}
          bool isEmpty() const;
          T getFront() const;
          T getBack() const;
          void enqueue(T newElement)
          {
              LinkedList&lt;T&gt;* newElem = new LinkedList&lt;T&gt;();
              newElem-&gt;element = newElement;
              if(front == 0)
              {
                  front = newElem;
              }
              else
              {
                   back-&gt;next = newElem;
              }
              back = newElem;
              listSize++;
           }
          void dequeue()
          {
              LinkedList&lt;T&gt;* tempElem = new LinkedList&lt;T&gt;();
              if(front == 0){
                  cout &lt;&lt; "List is empty!" &lt;&lt; endl;
              }
              else
              {
                  tempElem = front;
                  front = front-&gt;next;
                  cout &lt;&lt; "the element dequeued: " &lt;&lt; tempElem-&gt;element;
                  delete tempElem;
              }
          }
          void pop();
          void clear();
          bool contains(T element) const;
          void remove(T element);
  
      };
  
  
  
  
  
  #endif /* LINKEDLIST_H_ */
  </code></pre>