Fork me on GitHub

随笔 - 997  文章 - 5  评论 - 181  阅读 - 300万 

前记:

C语言的头文件是嵌入式系统中常用的,也是很多人没有注意的,但是写的很差的,这里给出一个经典的模板,仅供参考。

 

正文:

 

经典的格式:

复制代码
/**************************************
-----------------hello.h---------------------
product name:c code test
module name:hello
date:2020.12.04
auther:dylan 
file describe: hello process head file 
***************************************/

#ifndef  _HELLO_H_ 
#define _HELLO_H_

#ifdef __cplusplus // c++ include 
extern "C" { 
#endif       // include c++ file

//macro define
#define NAME 1

// variable 
char name;

//function include 
void printHello();

#ifdef __cpluscplus
}
#endif

#endif  //end _HELLO_H_
复制代码

 

posted on   虚生  阅读(1297)  评论(0编辑  收藏  举报
编辑推荐:
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
· 一个奇形怪状的面试题:Bean中的CHM要不要加volatile?
· [.NET]调用本地 Deepseek 模型
· 一个费力不讨好的项目,让我损失了近一半的绩效!
阅读排行:
· 微软正式发布.NET 10 Preview 1:开启下一代开发框架新篇章
· 没有源码,如何修改代码逻辑?
· PowerShell开发游戏 · 打蜜蜂
· 在鹅厂做java开发是什么体验
· WPF到Web的无缝过渡:英雄联盟客户端的OpenSilver迁移实战
历史上的今天:
2019-12-16 通信协议TLV的介绍及在python下的代码实现及仿真
2017-12-16 python chr()和ord()的含义和使用方法
点击右上角即可分享
微信分享提示