Including C Code in C++

后端 未结 2 1984
慢半拍i
慢半拍i 2021-02-13 03:12

I\'m trying to include C code into a simple C++ program but I ran into an unexpected problem - when I try to compile the program g++ gives the following error:

/         


        
相关标签:
2条回答
  • 2021-02-13 03:35

    It works just as expected. Make sure you haven't accidentally compiled sample1.c with g++.

    0 讨论(0)
  • 2021-02-13 03:44

    It works on my machine. Try GCC 4.7.0

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