title: How to Redefine Class Objects in C++
body: <p>I'm declaring an object inside an <code>if</code> statement, and I need to access it in another <code>if</code> statement. The object takes in 6 integers and 1 float as its parameters. </p>
  
  <pre><code>        if(mode == 1){
              Enemy ene(10 + enLi, 10 + enLi, 0, 0, enL, 1, 0.8);
              Enemy dashF(40, 40, 10, 10, 11, 1, 1.6); //I need to use these 2 objects...
          }else if(mode == 2){
              Enemy ene(18 + enLi, 18 + enLi, 0, 0, enL, 1, 1);
              Enemy dashF(52, 52, 10, 10, 12, 3, 2);
          }else if(mode == 3){
              Enemy ene(24 + enLi, 24 + enLi, 0, 0, enL, 1, 1.2);
              Enemy dashF(65, 65, 10, 10, 13, 3, 2.3);
          }else if(mode == 4){
              Enemy ene(28 + enLi, 28 + enLi, 0, 0, enL, 1, 1.4);
              Enemy dashF(80, 80, 10, 10, 14, 4, 2.8);
          }
          if(en == 1){
              battle(ene, "Wolf", false); // down here.
              start = false;
              koltForest();
              return;
          }else if(en == 2){
              battle(ene, "Bear", false);
              start = false;
              koltForest();
              return;
          }else if(en == 4){
              battle(dashF, "Dashing Falcon", true);
              return;
          }else{
              battle(ene, "Forest Rat", false);
              start = false;
              koltForest();
              return;
          }
  </code></pre>