title: error C2228: left of '.printStats' must have class/struct/union
body: <p>So I recently decided to pick up programming again and went with C++. Tried to make an adventurer class, but I seem to be running into some trouble. Here are my files:</p>
  
  <p>Adventurer.h:</p>
  
  <pre><code>#ifndef __Adventurer_H_INCLUDED__   //if Adventurer.h hasn't been included yet...
  #define __Adventurer_H_INCLUDED__   //#define this so the compiler knows it has been included
  
  class Adventurer
  {
  
      private:
  
          int hp, mp, str, agi, magic, armour;
  
      public:
  
          Adventurer(){}
          void printStats();
  
  }
  
  #endif
  </code></pre>
  
  <p>Adventurer.cpp:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include "Adventurer.h"
  
  
  
  Adventurer::Adventurer()
  {
  
      hp = 50;
      mp = 25;
      str = 5;
      agi = 5;
      magic = 5;
      armour = 5;
  }
  
  void Adventurer::printStats()
  {
  
      cout &lt;&lt; "HP = " &lt;&lt; hp &lt;&lt; "\n\n";
      cout &lt;&lt; "MP = " &lt;&lt; mp &lt;&lt; "\n\n";
      cout &lt;&lt; "str = " &lt;&lt; str &lt;&lt; "\n\n";
      cout &lt;&lt; "agi = " &lt;&lt; agi &lt;&lt; "\n\n";
      cout &lt;&lt; "magic = " &lt;&lt; magic &lt;&lt; "\n\n";
      cout &lt;&lt; "armour = " &lt;&lt; armour &lt;&lt; "\n\n";
  }
  </code></pre>
  
  <p>RPG_Game.cpp:</p>
  
  <pre><code>// my first program in C++
  #include &lt;iostream&gt;
  #include &lt;string&gt;
  #include "Adventurer.h"
  
  ;using namespace std;
  
  int main()
  {
      cout &lt;&lt; "Hello Adventurer! What is your name? \n";
      string advName;
      cin &gt;&gt; advName;
      cout &lt;&lt; "\nYour name is " &lt;&lt; advName &lt;&lt; "!";
      Adventurer *adv = new Adventurer();
      cout &lt;&lt; adv.printStats();
      delete adv;
      system(pause);
  }
  </code></pre>