Post

Log inSign up

Post

user avatar
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脳)
user avatar
はるはる
@haruharu_RQA
Jun 15
C言語、配列の長さを返す関数がないのガチか
6:40 AM · Jun 17, 202614.4KViews

New to X?

Sign up now to get your own personalized timeline!

Google で登録Google で登録。新しいタブで開きます
Sign up with Google
Create account

By signing up, you agree to the Terms of Service and Privacy Policy, including Cookie Use.

Relevant people

user avatar
Kazuho Oku@kazuhoFollow
Terms of Service|Privacy Policy|Cookie Policy|Accessibility|Ads info|© 2026 X Corp.
Don't miss what's happening
People on X are the first to know.
Log inSign up