title: Compiler Error C2955
body: <p>I m studying pointers and templates, and trying to create double linked list with templates. Compiler throws C2955 in 15 line.</p>
  
  <pre><code>#include "stdafx.h"
  #include &lt;iostream&gt;
  
  using namespace std;
  
  template&lt;typename T&gt;
  struct s_node
  {
      T value;
      s_node *p_next;
      s_node *p_prev;
  };
  
  template&lt;typename T&gt;
  s_node* createNode(s_node *p_parent = NULL) {
  
      s_node *p_newNode = new s_node;
  
      p_newNode-&gt;value = 0;
      p_newNode-&gt;p_next = NULL;
  
      if (p_parent != NULL) {
          p_parent-&gt;p_next = p_newNode;
      }
  
      return p_newNode;
  }
  </code></pre>