title: converting an array of integers to string
body: <p>If I have an array that looks like</p>
  
  <pre><code>int digits[size] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 4}
  </code></pre>
  
  <p>I want to remove the leading zeros and to do so I'm attempting to convert the array of integers into a string (which is an array of chars).</p>
  
  <p>My attempt looks like</p>
  
  <pre><code>string toString(int digits[], int size){
  string number = " ";
  for(int i = 0; i &lt; size - 1; i++){
      number[i] = digits[i];
  }
  return number;
  }
  </code></pre>
  
  <p>which came out horribly broken.</p>
  
  <p>I also can't simply remove all zeros, just the leading ones.</p>
  
  <p>Also if I may dogpile another question here:</p>
  
  <p>how can I identify if a string is numeric?</p>
  
  <p>e.g</p>
  
  <pre><code>string number = "12a4"
  cout &lt;&lt; "not a number"
  </code></pre>