3 ms·
I beg to differ. In C especially, static arrays are quite common as struct members and as static objects at file scope, because dynamic allocations are a pain t
by bluetomcat 8y ago
I beg to differ. In C especially, static arrays are quite common as struct members and as static objects at file scope, because dynamic allocations are a pain to manage and unnecessary when the maximum expected size is reasonably small.
When the size of such arrays is computed at compile-time via macro definitions, that feature is quite handy.
- WalterBright 8y ago> when the maximum expected size I pretty much never use static arrays because if I do I always without fail get a bug report when some user exceeds it.
- jibal 8y ago"In C especially, static arrays are quite common as struct members and as static objects at file scope" Not among good programmers (unless the array is immutable).