On 5/14/2017 7:06 PM, Ron Natalie wrote:
array kludge
Is it really a kludge? It's a
pointer.
int array[128];
Want to reference the array in a memcpy? Do: memcpy(destination, array,
sizeof(array));
Want to reference an element in the array? array[element #]
Want to pass (a reference to) said array to a function? function(array)
Not sure what the kludge is.
I think C is more consistent when it comes to arrays than a lot of other
languages. At least with C you KNOW it's a pointer to the original.