#ifdef __cplusplus是什么意思
生活随笔
收集整理的這篇文章主要介紹了
#ifdef __cplusplus是什么意思
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
#ifdef __cplusplus是什么意思?
?
Microsoft-Specific Predefined Macros
__cplusplus Defined for C++ programs only.
意思是說,如果是C++程序,就使用
extern "C"{
而這個東東,是指在下面的函數不使用的C++的名字修飾,而是用C的
The following code shows a header file which can be used by C and C++ client applications:
// MyCFuncs.h
#ifdef __cplusplus
extern "C" { // only need to export C interface if
// used by C++ source code
#endif
__declspec( dllimport ) void MyCFunc();
__declspec( dllimport ) void AnotherCFunc();
#ifdef __cplusplus
}
#endif
總結
以上是生活随笔為你收集整理的#ifdef __cplusplus是什么意思的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: cd库图像处理php,PHP图像处理类库
- 下一篇: java制作qq自动回复,求webqq自