From mboxrd@z Thu Jan 1 00:00:00 1970 From: krewat@kilonet.net (Arthur Krewat) Date: Sun, 14 May 2017 19:34:01 -0400 Subject: [TUHS] C declarations. In-Reply-To: <030d01d2cd06$c44e2840$4cea78c0$@ronnatalie.com> References: <6D3DCC45-B2C6-4374-83EE-F745C0AF7F36@bitblocks.com> <030d01d2cd06$c44e2840$4cea78c0$@ronnatalie.com> Message-ID: <013240e6-cc66-12c7-325d-a1edf4107726@kilonet.net> 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. -------------- next part -------------- An HTML attachment was scrubbed... URL: