quote:Original post by DrPizza
A great many platforms offer a function alloca() (or perhaps _alloca() ), which acts like a malloc() , only it allocates memory on the stack.
True, it is possible to allocate new stack memory, so I shouldn''t have spoken so carelessly. I was only trying to clear-up the common misconception that stack variables are given room on the stack at they time they appear in code. As you know, what really happens is that the compiler allocate memory and locations for those variables at the beginning of the function, regardless of where they are declared.
Besides, alloca is EVIL.
PS, Dr.Pizza, this:
quote:
VC++ 6 predates the C++ standard, and it seems a little unfair to expect it to follow it.
..is possibly the most level-headed thing ever said about Microsoft on this board.