Help!! Remove zeros from array New comment Mark Norris 2009.10.12 04:58 What's the best away to remove zeros (or any value for that matter) from a 1-dimensional array so that all the other data shifts down? For example, lets say I have the array: double array1[5] = {0,5,0,3,4}; and what I want to end up with is: {5,3,4} so that the new ArraySize is 3 and all the zeros are gone (i.e. the other values all shifted over once the zero was 'removed')? Thanks in advance! Clean up array, remove all data from array Questions from Beginners MQL5 MT5 MetaTrader 5 [ARCHIVE!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Can't go anywhere without you - 4. New comment
What's the best away to remove zeros (or any value for that matter) from a 1-dimensional array so that all the other data shifts down?
For example, lets say I have the array:
double array1[5] = {0,5,0,3,4};
and what I want to end up with is:
{5,3,4} so that the new ArraySize is 3 and all the zeros are gone (i.e. the other values all shifted over once the zero was 'removed')?
Thanks in advance!