How can I tell Visual Studio/Microsoft's C compiler to allow variable declarations after the first statement?

前端 未结 3 1350
感动是毒
感动是毒 2021-01-17 09:09

I have code that compiles on the GNUARM compiler, but Visual Studio 2010 issues errors. The issue involves declaring variables after the first statement in a C language file

3条回答
  •  盖世英雄少女心
    2021-01-17 09:42

    As of Visual Studio 2013, the Visual C++ compiler supports C99 style variable declarations. More details can be found in:

    http://blogs.msdn.com/b/vcblog/archive/2013/06/28/c-11-14-stl-features-fixes-and-breaking-changes-in-vs-2013.aspx

提交回复
热议问题