title: C++ constructor problem, values not being set
body: <p>I'm new to C++ and I'm trying to figure out this problem I'm having with my constructor for one of my classes. What happens is... all my variables are initialized properly except two (health and type).</p>
  
  <pre><code>#pragma once
  #include &lt;irrlicht.h&gt;
  #include &lt;vector&gt;
  #include &lt;cassert&gt;
  
  using namespace irr;
  using namespace core;
  using namespace scene;
  
  enum
  {
      PLAYER = 0,
      NPC = 1,
      SOLDIER = 2,
      CHAINGUNNER = 3
  
  };
  
  class Model
  {
      public:
          Model(void);
          Model(int id, std::vector&lt;ISceneNode*&gt; modelVec, int modType);
          ~Model(void);
  
          std::vector&lt;int&gt; path;
          std::vector&lt;ISceneNode*&gt; model;
          int endNode;
          int type;
          int animate;
          int health;
          u32 lastAnimation;
  
      private:
          int mId;
  };
  
  #include "Model.h"
  
  Model::Model(void)
  {
      //assert(false);
  }
  
  Model::Model(int id, std::vector&lt;ISceneNode*&gt; modelVec, int modType)
  {
      path = std::vector&lt;int&gt;();
      model = modelVec;
      endNode = 0;
      type = modType;
      animate = 0;
      health = 100;
      lastAnimation = 0;
      mId = id;
  }
  
  Model::~Model(void)
  {}
  </code></pre>
  
  <p>I create a model with Model soldier(id, model, SOLDIER) 
  Everything is set properly except type and health. I've tried many different things, but I cannot figure out my problem. I'm not sure but the default constructor is being called. It doesn't make sense because I make no called to that constructor.  </p>
  
  <p>Thanks, </p>
  
  <pre><code>vector&lt;ISceneNode*&gt; model;
  model.push_back(soldierBody);
  model.push_back(soldierHead);
  model.push_back(soldierWeapon);
  
  cout &lt;&lt; "Id of char: " &lt;&lt; id &lt;&lt; endl;
  
  Model soldier(id, model, SOLDIER);
  modelMap[id] = soldier;
  </code></pre>