Variable length arrays C99 not supported in C

别等时光非礼了梦想. 提交于 2019-11-27 04:51:09

问题


In Visual Studio 2005, I'm trying to compile a .c file:

int i = 6;
int a[i];

It doesn't work, so which standard does my compiler follow?


回答1:


Visual Studio only supports C89/90. They have no support for C99. Therefore you cannot use variable-length arrays in Visual Studio. Furthermore, Microsoft has no plans to add support for C99 in their C compiler.



来源:https://stackoverflow.com/questions/7871019/variable-length-arrays-c99-not-supported-in-c

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!