title: Error C2084 Function already has a body
body: <p>I've seen this all over the site and still nothing has been able to fix my problem. this is the only error I have and I have no idea how to fix this. I've tried commenting out different sections of the code just to see what happens and still nothing but errors. What is going on?</p>
  
  <p>Her is the build error as well</p>
  
  <p>error C2084: function 'HeroProfile::HeroProfile(void)' already has a body</p>
  
  <p>Main.cpp </p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  
  #include "HeroProfile.h"
  
  using namespace std;
  
  int main()
  {
  string name;
  int race;
  double weight;
  
      cout &lt;&lt; "Enter your Hero's name:";
  cin&gt;&gt; name;
  cout &lt;&lt; "Enter your Hero's Race (1:Elf 2:Human 3 Dwarf)";
  cin &gt;&gt; race;
  cout &lt;&lt; "Enters your Hero's weight ( in pounds):";
  cin &gt;&gt; weight;
  
  HeroProfile Hero_1(name, race, weight);
  
  cout &lt;&lt; endl &lt;&lt; "hero's Name: " &lt;&lt; Hero_1.getName() &lt;&lt; endl &lt;&lt;
      "Race: " &lt;&lt; Hero_1.getRace() &lt;&lt; endl &lt;&lt;
      "Weight:" &lt;&lt; Hero_1.getWeight() &lt;&lt; endl;
  
  cout &lt;&lt; endl;
  
  cout &lt;&lt; "Enter your Hero's Name:";
  cin &gt;&gt; name;
  cout &lt;&lt; "Enter your Race (1:Elf 2:Human 3 Dwarf)";
  cin &gt;&gt; race;
  cout &lt;&lt;"Enter your Hero's weight (in pounds)";
  cin &gt;&gt; weight;
  
  HeroProfile Hero_2(name, race, weight);
  
  Hero_2.setName(name);
  Hero_2.setRace(race);
  Hero_2.setWeight(weight);
  
  cout &lt;&lt; endl &lt;&lt; "Hero's Name: " &lt;&lt; Hero_2.getName() &lt;&lt; endl &lt;&lt;
      "Race: " &lt;&lt; Hero_2.getRace() &lt;&lt; endl &lt;&lt; "Weight: " &lt;&lt; Hero_2.getWeight() &lt;&lt;     endl;
  
  return 0;
  }
  </code></pre>
  
  <p>The header File</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  
  using namespace std;
  
  #ifndef HeroProfiel_H 
  #define HeroProfile_H
  
  class HeroProfile 
  {
  
  public:
      //default constructor
      HeroProfile();
  
      //overlaod constructor
      HeroProfile(string, int, double);
  
      //destructor
      ~HeroProfile();
  
      //Accesor functions
      string getName() const;
          // get name - returns name of patient
  
      int getRace() const;
          // getHeight-returns height of patient
  
      double getWeight() const;
          // getWeight- returns weight of patient
  
      //Mutator Functions
      void setName(string);
          //set name of patient
          //@param string - name of patient
  
      void setRace(int);
          //setHeight-sets heigh tof patient
          //@param int- height iof patient
  
      void setWeight(double);
      //setWeight-sets weight of patiend
      //@param double-weight of patient
  
  
  
  private:
      //Memeber variables
      string newName;
      int newRace;
      double newWeight;
  
  
  
  
  };
  
  #endif
  </code></pre>
  
  <p>and the second .cpp file</p>
  
  <pre><code>#include "HeroProfile.h"
  
  eroProfile::HeroProfile() //Default constructor
  {
  newRace = 0;
  newWeight = 0.0;
  }
  
  HeroProfile::HeroProfile(string name, int race, double weight) //Overloaded Constructor
  {
  newName = name;
  newRace = race;
  newWeight = weight;
  }
  
  HeroProfile::HeroProfile()
  }
  }
  
  //Accessors
  string HeroProfile::getName() const 
  {
  return newName;
  }
  
  int HeroProfile::getRace() const 
  {
  return newRace;
  }
  
  double HeroProfile::getWeight() const
  {
  return newWeight;
  }
  
  //Mutators
  void HeroProfile::setName(string name)
  { 
  newName = name;
  }
  
  void HeroProfile::setRace(int race)
  {
  newRace = race;
  }
  
  
  void HeroProfile::setWeight(double weight)
  {
  newWeight = weight;
  }
  </code></pre>