title: Linked list (invalid conversion from 'Node<int>*' to 'int' [-fpermissive]|)
body: <p>I want to create Node likes Arraylist in c++. When I create a method get(); it said about the error. I don't understand when I go to find the answer on the internet. Can You Please Help Me Find This Answer? </p>
  
  <pre class="lang-cpp prettyprint-override"><code>template&lt;typename T&gt;
  
  struct Node{           //Node
      T data;
      Node&lt;T&gt; *next;
      Node(){
         next=NULL;
      }
      Node(T value){
          data=value;
          next=NULL;
      }
  
  };
  
  template&lt;typename T&gt;
  
  class LinkedList{   //class Node 
      public:
          Node&lt;T&gt; *head;
          Node&lt;T&gt; *tail;
  
          void add(T value){         //method create newnode add to tail
              Node&lt;T&gt; *newNode=new Node&lt;T&gt;(value);
              if (head == NULL){
                  head=newNode;
                  tail=newNode;
              }
              else {
                  tail-&gt;next=newNode;
                  tail=newNode;
              }
          }
          void PrintAll(string Name){   //method print all node
              Node&lt;T&gt; *current;
              int i=0;
              current=head;
              while (current != NULL ){
                  printf("%s[%d]=%d\n",Name.c_str(),i,current-&gt;data);
                  current=current-&gt;next;
                  i++;
              }
          }
          T get(int index){      //method show node in parameter 
              Node &lt;T&gt; *current=head;
              int count=0;
              while (current != NULL){
                  if ( count == index) return current-&gt;next;
                  current=current-&gt;next;
                  count++;
              }
          }
  
  };
  </code></pre>
  
  <p>error: invalid conversion from 'Node*' to 'int' [-fpermissive]|
  warning: control reaches end of non-void function [-Wreturn-type]|</p>