title: Removing zeros from an array and resizing the array to the new amount of elements?
body: <p>I am having another problem with manipulating data in a C++ array. I now want to decimate the array by removing all the zeros from it.</p>
  
  <p>So for example say before I had <code>array[4] = {1,2,0,0,4}</code> It would become <code>array[3] = {1,2,4}</code>. </p>
  
  <p>I know that I will need to use a for loop to iterate through the array storing the main data and that I will most likely need to initialize a new array to store the decimated data but I am not quite sure how to go about it.</p>