伪代码如下:
#ifdef __cplusplus extern "C" {
#endif #include <....h> #ifdef __cplusplus } #endif
如果在C的编译环境中,代码就变成了:
#include <....h>
如果在C++环境中,代码就变成了:
extern "C" {
#include <....h> }
#if __cplusplus < L #error “Should use –std=c++11 option for compile #endif
发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/227555.html原文链接:https://javaforall.net
