#ifdef __cplusplus是什么意思
2005-10-15 19:32
393 查看
#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
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 是什么意思?
- #ifdef __cplusplus 倒底是什么意思?
- #ifdef __cplusplus 倒底是什么意思?
- #ifdef __cplusplus 倒底是什么意思?
- #ifdef __cplusplus 倒底是什么意思?
- #ifdef __cplusplus 倒底是什么意思?
- #ifdef __cplusplus 到底是什么意思?
- #ifdef__cplusplus 是什么意思?
- #ifdef __cplusplus 倒底是什么意思?
- #ifdef __cplusplus 倒底是什么意思?
- C++中extern"C"深层含义&&#ifdef __cplusplus 倒底是什么意思?
- lwip1.4 arp #ifdef __cplusplus 倒底是什么意思?
- #ifdef __cplusplus 倒底是什么意思?
- 【C/C++】#ifdef __cplusplus 到底是什么意思?
- #ifdef __cplusplus 倒底是什么意思?
- #ifdef __cplusplus 倒底是什么意思?
- #ifdef __cplusplus 倒底是什么意思?
- #ifdef __cplusplus 倒底是什么意思?
- #ifdef __cplusplus 倒底是什么意思?(转)
- #ifdef __cplusplus 倒底是什么意思?