I am developing in Cocoa / Xcode and have an int *
array containing values.
When I want to use memcpy
to shift values in the array, it transfers only 0s.
e.g.
- Array contains values as 1 2 3 4
memcpy(array,array+2*sizeof(int),2*sizeof(int));
result: 0,0,3,4
Is there a better alternative to memcpy, or something I am doing wrong ?