
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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!