__cplusplus解析
来源:互联网 发布:php网络编程 编辑:程序博客网 时间:2024/05/16 13:59
如果包含非系统提供的头文件并且你可以修改这个头文件,你做好要添加extern “C” {…} 逻辑块在这个头文件中,以便使用者可以#include包含在他们的C++代码中很好地使用它们。C编译器不能失败extern “C” {…},所以使用宏定义__cplusplus,这样C编译器就不能看到给部分代码。
语法结构
#ifdef __cplusplusextern "C" {#endif// 添加自己的代码在c头文件中#ifdef __cplusplus}#endif
0 0
- __cplusplus解析
- __cplusplus
- __cplusplus
- __cplusplus
- __cplusplus
- __cplusplus
- __cplusplus
- __cplusplus
- #ifdef __cplusplus
- __cplusplus 用法
- #ifdef __cplusplus
- #ifdef __cplusplus
- #ifdef __cplusplus
- #ifdef __cplusplus
- __cplusplus 含义
- #ifdef __cplusplus
- #ifdef __cplusplus
- defined(__cplusplus)
- Flash手游《孤胆英雄》独立开发者专访
- PHP设计模式漫谈之调解者模式
- Xcode 新建项目时ViewController.m默认的viewDidLoad消失
- shell自动打包ipa
- codeforces 397B On Corruption and Numbers-yy-(求区间内的整数能否凑成某一整数)
- __cplusplus解析
- JAVA RMI远程方法调用简单实例
- java中yyyy-MM-dd HH:mm:ss类型转换成long类型
- ASP.NET MVC4中调用WEB API的四个方法
- IOS中使得图片模糊的效果的方法
- OpenGL中的多重采样
- uva 196 spreadsheet
- Android Context简介
- hadoop权威指南(第四版)要点翻译(1)——Foreword and Preface