2 ms·
I wouldn't call it a "need", more like "occasionally desirable". The short version is that it's a convenient method of letting the compiler handle resource man
by binarycrusader 14y ago
I wouldn't call it a "need", more like "occasionally desirable". The short version is that it's a convenient method of letting the compiler handle resource management when you have a variable number of values and sufficient stack space. As others pointed out, it's particularly handy for multi-dimensional arrays.
There are also some possible applications here:
http://gustedt.wordpress.com/2011/01/13/vla-as-function-arguments/ http://gustedt.wordpress.com/2011/01/13/vla-as-function-argu...
In fairness, I've used them only rarely, but those few times I've used them have saved me a bit of grief.
I could easily live without them if required...