title: Method Calling from header files
body: <p>I have a programming assignment where I'm supposed to write up the code for inserting and removing linked lists. However I haven't used C++ in a while and am struggling remember certain things. </p>
  
  <p>Right now, I am simply trying to put a prototype method in a header file, define it in my cpp file, and then call it in my main method. this is what I have.</p>
  
  <p><strong>LinkedList.h</strong></p>
  
  <pre><code>#include &lt;iostream&gt;
  
  using namespace std;
  
  class LinkedList {
  
  public:
      void testPrint();
  };
  </code></pre>
  
  <p><strong>LinkedList.cpp</strong></p>
  
  <pre><code>#include "LinkedList.h"
  
  int main() {
      LinkedList::testPrint();
  
  }
  
  void LinkedList::testPrint() {
       cout &lt;&lt; "Test" &lt;&lt; endl;
  }
  </code></pre>
  
  <p>I am getting the following errors</p>
  
  <pre><code>a nonstatic member reference must be relative to a specific object
  'LinkedList::testPrint': non-standard syntax; use &amp; to create a pointer to member
  </code></pre>