Author: Unknown
Subject: Length of Array
Date: Tuesday, 14 Apr 2020, 01:09:45
I'm trying to find the length of an array using
sizeof(array) / sizeof(array[0])
but when I do it I get this warning
Hash.c:76:32: warning: division `sizeof (struct triple *) / sizeof (struct triple)' does not compute the number of array elements [-Wsizeof-pointer-div]
76 | int lenArray = sizeof(array) / sizeof(array[0]);
| ^
Is there a different way I can find the length of the array?
PREV
INDEX
NEXT