4 ms·
Everyone always trots this out when talking about multidimensional array programming in C, but it's effectively useless because it only works for statically dec
by StefanKarpinski 13y ago
Everyone always trots this out when talking about multidimensional array programming in C, but it's effectively useless because it only works for statically declared, fixed-size arrays. Since those never occur when writing real numerical code, the fact that the compiler in this one very particular case can turn x[i][j] into x[i*s+j] for me is essentially useless for any real work with dynamically allocated, variably sized multidimensional arrays.
- mikeash 13y agoIn which case the correct statement would have been something like "Multidimensional arrays in C are not very useful in practice," rather than "they don't exist".