title: error: expression must have class type
body: <p>First of all i know there are other questions that are essentially the same as this one but none of the answers seem to work for me. I'm pretty new to c++ and programming in general so please describe as simply as possibly, thank you. </p>
  
  <p>So I'm trying to make a simple text game and i have a couple files but when i try to use a method from a class it causes an error that says the expression must have a class type.</p>
  
  <p>Here's the code.</p>
  
  <p>main.cpp</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  #include &lt;ctime&gt;
  #include &lt;cstdlib&gt;
  #include "Warrior.h"
  using namespace std;
  
  
  //main function
  int main (void)
  {
  //title screen
  cout&lt;&lt; " _____ _           _        _____         \n";
  cout&lt;&lt; "|   __|_|_____ ___| |___   | __  |___ ___ \n";
  cout&lt;&lt; "|__   | |     | . | | -_|  |    -| . | . |\n";
  cout&lt;&lt; "|_____|_|_|_|_|  _|_|___|  |__|__|  _|_  |\n";
  cout&lt;&lt; "              |_|                |_| |___|\n";
  cout&lt;&lt; "\n\n       Enter any # to start \n ";  
  
  int start;
  anumber:
  cin&gt;&gt; start;
  
  if (start &lt; 0 || start &gt; 0)
  {
      cout&lt;&lt; "\nWelcome to Sam Acker's simple rpg game!\n";
  }
  
  Warrior your_warrior(int health , int armor , int weapon);
  your_warrior.warrior_name_function; //This is the line with the error
  
  
  int exit;
  cin&gt;&gt; exit;
  return 0;
  }
  </code></pre>
  
  <p>Warrior.h</p>
  
  <pre><code>#include &lt;string&gt;
  #include &lt;iostream&gt;
  class Warrior
  {
  private:
  int health;
  int weapon;
  int armor;
  std::string warrior_name;
  
  public:
  int attack();
  int warrior_name_function();
  
  Warrior(int health , int weapon , int armor);
  ~Warrior();
  };
  </code></pre>
  
  <p>Warrior.cpp</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  #include &lt;ctime&gt;
  #include &lt;cstdlib&gt;
  #include "Warrior.h"
  
  
  int Warrior::warrior_name_function()
  {
  std::cout&lt;&lt; "What would you like to name you warrior?\n";
  std::cin&gt;&gt; Warrior::warrior_name;
  return 0;
  }
  
  
  int Warrior::attack()
  {
  return 0;
  }
  
  
  
  Warrior::Warrior(int health , int armor , int weapon)
  {
   health == 100;
   armor == 1;
   weapon == 16;
  }
  
  
  Warrior::~Warrior()
  {}
  </code></pre>