注册 登录
编程论坛 新人交流区

ifdef __cplusplus问题?

Cking 发布于 2007-10-16 23:27, 344 次点击
// MyCFuncs.h
#ifdef __cplusplus-------0
extern "C" { // only need to export C interface if
// used by C++ source code
#endif --------1

__declspec( dllimport ) void MyCFunc();
__declspec( dllimport ) void AnotherCFunc();

#ifdef __cplusplus --------2
}

#endif ------3

以上程序中,0处是和3对应。1和2怎么对应啊?是不是1和2 写反了?应该先有if,然后有end?
谢谢啊!
3 回复
#2
Cking2007-10-17 13:31
那位大侠帮个忙啊?
#3
bqilu2007-10-17 14:56
回复:(Cking)ifdef __cplusplus问题?
0和1 2 和3
#4
Cking2007-10-17 16:08
那为什么{}里面第1行和最后移行要有1和2呢?
1