It's been a while since I looked at the C code, but I'm trying to figure out what is going on here. Someone declared this (has more members in their code):
int trysizes[] = { 64, 64, 128, 64, };
Then they use this as part of the for loop:
sizeof(trysizes)/sizeof*(trysizes)
I think the first part is the number of bytes in the array, and the second part is the size of each member of the array, which gives us the number of elements in the array. Is this the standard way to calculate the length of an array and what the second size actually does?
c sizeof
Ben flynn
source share