Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Variable length arrays C99 not supported in C

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?

like image 438
user103214 Avatar asked Feb 23 '23 15:02

user103214


1 Answers

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.

like image 163
Mysticial Avatar answered Mar 05 '23 18:03

Mysticial