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.
So for example say before I had array[4] = {1,2,0,0,4} It would become array[3] = {1,2,4}.
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.
If you have to resize array’s why not simply use std::vector. The example does it.