Kazuho Oku@kazuho実務上は #define countof_array(a) (sizeof(a) / sizeof((a)[0]) + 0 * sizeof(struct { int _ : 1 - 2 * !__builtin_types_compatible_p(__typeof__((a)[0])[], __typeof__(a));})) とかでいけるやつ(GCC/Clang脳)はるはる@haruharu_RQAJun 15C言語、配列の長さを返す関数がないのガチか6:40 AM · Jun 17, 202614.4KViewsRead 1 reply