title: Converting from int to CString
body: <pre><code>TestString::TestString(int num) 
  </code></pre>
  
  <p>This is a conversion constructor that should convert an integer to a string. </p>
  
  <p>For example, if 123 is passed in, the TestString object should store the string data that would be represented by the <strong>c-string</strong> "123".</p>
  
  <pre><code>class TestString //header file
  {
     public:
     TestString (int num);
     //etc.
  
     private:
     int size;
     char* str;
  };
  
  TestString::TestString (int num) //.cpp file 
  {
      char c = static_cast&lt;char&gt;(num);
  
      str = new char[size]; //missing size variable
  
      int i = 0;
  
      for (i; cstr[i] != '\0'; i++) //missing cstr array
          str[i] = cstr[i];
  
      str[i] = cstr[i]; //to tack on null character
  }
  </code></pre>
  
  <p>As you can tell I am missing both the size variable and cstr string in the definition. I don't know if I'm going about this all wrong or just having trouble understanding what sort of setup I'm being asked for...</p>
  
  <p>Any pointers or suggestions greatly appreciated.</p>
  
  <p>Only libraries permitted:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;iomanip&gt;
  #include &lt;cstring&gt;
  #include &lt;cctype&gt;
  </code></pre>