Windows 中的头文件 alloca.h

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/6704879/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 17:26:35  来源:igfitidea点击:

Header alloca.h in Windows

cwindowsvisual-studio-2010gcc

提问by Cartesius00

I can't see any alloca.hequivalent in Visual C 2010. How can one perform stack allocation in Visual Con Windows? I miss the function alloca.

alloca.hVisual C 2010. 如何Visual C在 Windows 上执行堆栈分配?我想念这个功能alloca

回答by MSalters

See _alloca. Visual C uses an _ prefix for non-standard functions in the C headers.

_alloca。Visual C 对 C 头文件中的非标准函数使用 _ 前缀。

回答by Gaspa79

There's no alloca.h in windows. You should

Windows 中没有 alloca.h。你应该

#include <malloc.h>

instead. The alloca function is there

反而。alloca 函数在那里