#ifdef和#endif

代码: #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风格的外部函数
2013-08-12 17:14 | 阅读 1084 次 | 评论 0 条
文章分类
文章归档
最新评论