== Quote from Frits van Bommel ([EMAIL PROTECTED])'s article > A workaround you could use: > ----- > // N == your "arbitrary but reasonable value", use whatever you want. > // (Add "= void" to next line to avoid initialization if you prefer) > T[N] stackbuf; // don't use this except in next line > T[] buf = stackbuf; // Set reference to stack buffer > // Shrink to smaller size or heap-allocate bigger size: > buf.length = length; > -----
If I'm going to do something this hackish and ugly, I may as well just use alloca explicitly.
