摘要: 做网络芯片开发等低端开发和网络协议栈的时候用的非常的多举个简单的例子我们有个32位的一个变量A而我们还可能需要用到A的低16位AL这个时候我们就可以定义一个联合就可以表示AL了若16需再次划分,那么可以在联合中再次用一次联合写个例子你看下Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->1#include<stdio.h>23typedefunion4{5unsignedintAx;6structAX7{8unsignedintAL 阅读全文
posted @ 2010-12-26 01:38 prepat 阅读(713) 评论(0) 推荐(0) 编辑