<1>.c文件编译处理:右击.c文件选择properties->precompiled Header->create/use precompiled header 选择:not using precompiled header
<2>c头文件处理:如果项目中有一个头文件 aa.h 如下处理:
#ifndef _AA_H
#define _AA_H
#ifdef __cplusplus
extern "C" {
#endif
int cc(int a, int b);
#ifdef __cplusplus
}
#endif
#endif
本文介绍如何处理C文件的编译配置及头文件的预处理指令使用方法,确保代码正确编译并避免重复包含的问题。适用于C语言初学者及开发者。
1364

被折叠的 条评论
为什么被折叠?



