作者在 2013-08-12 17:14:34 发布以下内容
代码:
#ifdef __cplusplus
extern "C"
{
#endif
void abc(int);
#ifdef __cplusplus
}
#endif
预编译宏,如果定义了__cplusplus这个宏,那么代码被展开为
extern "C" {
void abc(int);
}
否则就是
void abc(int);
至于
extern "C" {
void abc(int);
}
意思可能是指声明abc为c风格的外部函数