C标准库学习之<stddef.h> ——定义部分宏
来源:互联网 发布:程序员不想谈恋爱 编辑:程序博客网 时间:2024/06/07 05:18
#include<stdio.h>#include <stddef.h> // /*=========================================================time: 2017年2月3日11:04:50objective: test C language's head file of <stddef.h> version: Microsoft Visual C++author: ChenFeiremark: 日文system 有些字没法打要用pin音代替=========================================================*//* kubian量 lei型 ptrdiff_t 有符号整数lei型,是liang个指zhen相jian的jie果; size_t 无符号整数lei型,是guanjian字 sizeof 的jie果; wchar_t 是kuan字fu常量大小的整数lei型; 定yi的宏 NULL offsetof(type, member-designator): 返回 size_t,是struts中menber的字jie偏移量 http://blog.csdn.net/hairetz/article/details/4084088*/struct address { char name[50]; char street[50]; int phone;};int main(void){ printf("address jiegou中 name 偏移 = %d byte\n", offsetof(struct address, name)); printf("address jiegou中 street 偏移 = %d byte\n", offsetof(struct address, street)); printf("address jiegou中 phone 偏移 = %d byte\n", offsetof(struct address, phone)); return 0;}
0 0
- C标准库学习之<stddef.h> ——定义部分宏
- 《C标准库》——之<stddef.h>
- C 标准库 - <stddef.h>
- C /C++标准库 - <cstddef> (stddef.h)
- C标准库学习之<assert.h> ——诊断
- C标准库学习之<errno.h> ——错误
- c library-stddef.h
- 探秘C stddef.h
- C标准库参考指南系列译文(11)stddef.h
- C语言中的offsetof宏(定义在stddef.h头中)
- Linux学习------分析list.h 之 宏定义部分
- stddef.h头文件学习
- C标准库学习之<math.h> ——数学函数
- C标准库学习之<ctype.h> ——字符处理
- C标准库学习之<setjmp.h> ——非局部跳转
- C标准库学习之<stdarg.h> ——不定参数处理
- C标准库——time.h学习
- 《C标准库》——之<stdarg.h>
- 看完《毕业时刻》有感,随便写点
- Win7下apache出现问题:“No services installed” || apache服务启动
- 【普里姆算法】最小生成树-例题
- java中的“包”与C#中的“命名…
- 第三届蓝桥杯决赛_本科一题
- C标准库学习之<stddef.h> ——定义部分宏
- PHP4 与 MySQL 数据库操作函数
- 什么是DQL、DML、DDL、DCL
- 程序启动后,可以从键盘输入接收多个整数,直到输入quit时结束
- 设置span的宽度
- SolrCloud中一台server宕机情况下…
- spring-data-neo4j 自定义返回结果
- ActiveMQ基本介绍
- Fragment之间切换时onResume效果的使用