摘要: 转自:http://blog.chinaunix.net/uid-21411227-id-1826909.html1.前言:时常在cpp的代码之中看到这样的代码:#ifdef __cplusplusextern "C" {#endif//一段代码#ifdef __cplusplus}#endif 这样的代码到底是什么意思呢?首先,__cplusplus是cpp中的自定义宏,那么定义了这个宏的话表示这是一段cpp的代码,也就是说,上面的代码的含义是:如果这是一段cpp的代码,那么加入extern "C"{和}处理其中的代码。 要明白为何使用extern & 阅读全文
posted @ 2013-08-23 00:03 Rabbit_Dale 阅读(706) 评论(0) 推荐(0) 编辑