3 ms·
You need to pass a pointer to an array: https://godbolt.org/z/jYzY79ac4 https://godbolt.org/z/jYzY79ac4 When passing an array it decays into a pointer and the
by uecker 3y ago
You need to pass a pointer to an array:
https://godbolt.org/z/jYzY79ac4 https://godbolt.org/z/jYzY79ac4
When passing an array it decays into a pointer and the size is lost. We can also change sizeof to recover it, but there was a proposal for a _Lengthof operator which could work here.