## 用于结构体的定义
来源:互联网 发布:帝国cms微信支付接口 编辑:程序博客网 时间:2024/09/21 08:53
- 宏定义:在嵌入式代码中比较常用,具体使用可看MFC的框架部分
- ##:起连接作用,对于嵌入式代码,##运算符是比较常用的
/************************************************************************* > File Name: ##3.c > Author: ma6174 > Mail: ma6174@163.com > Created Time: 2017年10月23日 星期一 12时27分14秒 ************************************************************************/#include<stdio.h>#define STRUCT(type)\ typedef struct _tag_##type type ;\ struct _tag_##typeSTRUCT(Student){ char* name ; int id ;};int main(void){ Student stuArr[5] ; stuArr[1].name = "zhangsna" ; stuArr[1].id = 14044201 ; stuArr[3].name = "Z.J" ; stuArr[3].id = 14044202 ; printf("%s\t %d\n",stuArr[1].name,stuArr[1].id); printf("%s\t %d\n",stuArr[3].name,stuArr[3].id); return 0;}
阅读全文
0 0
- ## 用于结构体的定义
- 结构体的定义
- 结构体的定义
- 结构体的定义
- c/c++中typedef详解(此文对typedef用于结构体的定义说明得很清楚到位)
- 用于表示socket的结构体
- 用于多种结构体的函数对象
- 用于表示socket的结构体
- 用于表示socket的结构体
- 结构体的定义和结构变量的定义
- 定义结构体的方法
- 结构体数组的定义
- 用于自定义数据/结构体的剪切板应用模板类
- 关于“头文件用于声明而不是用于定义”的理解
- 相互引用的结构体的定义
- NoSQL的CURD结构体的定义
- typedef用于函数定义的一个例子
- 用于CSS属性定义的语法
- Qt5.9.2 (MinGW5.3.0 32bit)+ opencv3.3.1 环境配置
- 机器学习 ——支持向量机SVM
- 算法导论16.2-5
- HDU-1237 简单计算器【栈】
- c++模板深度理解
- ## 用于结构体的定义
- 问题:Linux 设备 eth0 似乎不存在, 初始化操作将被延迟
- HTML 文本格式化
- HDU2457-DNA repair
- php7.0以上版本 mcrypt拓展无法使用导致小程序登录数据无法解密
- STM32外部晶振8M更改为25M
- 计算机网络原理——网络设备
- matlab区分卷积和相关
- 6.6