#ifndef __CFG_OP_H__
#define __CFG_OP_H__
#ifdef __cplusplus
extern "C" {
#endif
//获取配置项
int GetCfgItem(char *pFileName , char *pKey , char * pValue, int * pValueLen );
//写配置项
int WriteCfgItem(char *pFileName , char *pItemName , char *pItemValue, int itemValueLen );
#ifdef __cplusplus
}
#endif
#endif
C语言条件编译问题,详细写下if和endif怎么匹配
答案:2 悬赏:0 手机版
解决时间 2021-02-01 04:33
- 提问者网友:皆是孤独
- 2021-01-31 05:46
最佳答案
- 五星知识达人网友:街头电车
- 2021-01-31 07:07
就像for循环的括号一样
#ifndef __CFG_OP_H__跟最后一个#endif
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
}
#endif
#ifndef __CFG_OP_H__跟最后一个#endif
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
}
#endif
全部回答
- 1楼网友:人间朝暮
- 2021-01-31 07:34
如果你不想compile这段调试代码时,你只需要将
#define debug 1
修改为
#define debug 0
就行,这样可以省很多麻烦。
这个就叫做条件编译。
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯