1. offsetof

#include <stddef.h>

size_t offsetof(type, member);

The macro offsetof() returns the offset of the field member from the start of the structure type.

2. float和int转换

最简单的方法是采用union。

    float ff = 123456.0;
union{int i; float f;} conv;
conv.f = ff;
aa[] = (unsigned short)conv.i;
aa[] = (unsigned short)(conv.i >> );
printf("%X, %X, %X\n", conv.i, aa[], aa[]);

最新文章

  1. Winform开发框架之权限管理系统的改进
  2. HTTP 笔记与总结(1 )Telnet 分别发送 HTTP GET 和 HTTP POST 请求
  3. configuring tortoise git and vs code.
  4. CentOS安装RockMongo
  5. 使用WIF实现单点登录Part I——Windows Identity Foundation介绍及环境搭建 -摘自网络
  6. windows server 2003 服务器
  7. xmlplus 组件设计系列之六 - 下拉刷新
  8. WinccFlexible 同一个项目创建多个connections
  9. SQLServer之FOREIGN KEY约束
  10. python小白——进阶之路——day2天-———变量的缓存机制+自动类型转换
  11. [daily] 不让NetworkManger自动接管网络设备
  12. Debian系统 + XFCE桌面初识,基础环境搭建
  13. mysql 开发基础系列1 表查询操作
  14. MySQL的主从分离基本配置
  15. 奶牛编号(Cowids) [NOIP模拟]
  16. PL/SQL学习笔记之存储过程
  17. Linux下查看编辑二进制文件:hexedit神器
  18. 分形之科赫(Koch)雪花
  19. October 27th, 2017 Week 43rd Friday
  20. ZOJ1100 Mondriaan&#39;s Dream

热门文章

  1. WebClient上传下载文件,小白篇
  2. 从Java中的length和length()开始
  3. JavaScript-Load-Image
  4. 自动化应用一键部署卸载&amp;持续构建测试与交付
  5. Flask基础以及Response三剑客
  6. Git-Runoob:Git 教程
  7. Jackson 数据类型转换
  8. 阶段3 1.Mybatis_09.Mybatis的多表操作_1 mybatis表之间关系分析
  9. Python学习之==&gt;模块结构调整
  10. Matlab——数值计算——单个代数方程 代数方程组