title: "Reset" object to default values; recall constructor?
body: <p>I have a class <code>characterData</code> with a constructor:</p>
  
  <pre><code>class characterData() {
      private:
          int position[2];
          vector&lt;vector&lt;int&gt; &gt; pixelData;
          int num;
      public:
          characterData() {
              num = -1;
          }
          void setValues(int p[2], vector&lt;vector&lt;int&gt; &gt; v, int n) {
              position[0] = p[0];
              position[1] = p[1];
              pixelData = v;
              num = n; // if setValues() is called, n will always &gt; -1
          }
  };
  </code></pre>
  
  <p>I do it this way so I can have an "empty" <code>characterData</code> in my code. My thought process is if <code>num == -1</code>, <code>setValues()</code> has not been called on the <code>characterData</code> object.</p>
  
  <p>Later in my code I have a <code>characterData k</code> which is only initialized, <code>setValues()</code> has not been called upon it, so <code>k.num == -1</code>.</p>
  
  <p>Eventually I change the value of <code>k</code> but wish to "reset" it to its original form. </p>
  
  <pre><code>characterData k;
  // some assignments happen, k = something else
  k = new characterData(); // reset k
  </code></pre>
  
  <p>The above doesn't work. I need to reset <code>k</code> such that <code>k.num == -1</code>. There is no member setter/mutator function that can allow me to change <code>num</code> at all: my thought was to recall constructor but this doesn't work.</p>
  
  <p>How do I reset <code>k</code> to an "empty" state?</p>