title: Visual Studio 2015 "non-standard syntax; use '&' to create a pointer to member"
body: <p>I am attempting my own Linked List implementation in C++ and cannot for the life of me figure out why I am having this error. I know there is an STL implementation but for reasons I am trying my own. Here is the code:</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  template &lt;class T&gt;
  class ListElement {
  public:
      ListElement(const T &amp;value) : next(NULL), data(value) {}
      ~ListElement() {}
  
      ListElement *getNext() { return next; }
      const T&amp; value() const { return value; }
      void setNext(ListElement *elem) { next = elem; }
      void setValue(const T&amp; value) { data = value; }
  
  private:
      ListElement* next;
      T data;
  };
  
  int main()
  {
      ListElement&lt;int&gt; *node = new ListElement&lt;int&gt;(5);
      node-&gt;setValue(6);
      std::cout &lt;&lt; node-&gt;value(); // ERROR
      return 0;
  }
  </code></pre>
  
  <p>On the specified line, I get the error "non-standard syntax; use '&amp;' to create a pointer to member". What the hell does this mean?</p>