防止头文件被多次编译的写法有两种

来源:互联网 发布:速记用什么软件 编辑:程序博客网 时间:2024/05/21 10:06

1#pragma once

2#ifndef  __BLUETOOTH_H__

   #define  __BLUETOOTH_H__

.........

#endif

67、注释整个文件的方法

在头文件中使用#if defined(HAVE_BULE_MODE) && (HAVE_BULE_MODE > 0)//HAVE_BULE_MODE在项目属性中的预处理器定义

......

#endif

阅读全文
0 0