Is it possible to compile pre-ANSI (K&R-style) C code with Visual C++?

后端 未结 1 1504
日久生厌
日久生厌 2020-12-20 18:16

We have some old C code with pre-ANSI (K&R-style) function declarations. For example:

int foo(x, y)
double x, y;
{
    /* do some stuff */
}


        
相关标签:
1条回答
  • 2020-12-20 18:33

    In order to get this to compile put the code in a .c file vs. a .cpp. This instructs Visual Studio to compile the code as C instead of C++

    0 讨论(0)
提交回复
热议问题