#include <stdio.h>

union test1;    // declaration

union test2 {  // The definition of union test2
int a;
} union test3 { // The test4 definition of type union test3
int b;
} test4;

declaration : 告訴 compiler 如何解讀 identifier,

及接受這個 reference of identifier,

也就是類似 extern int a;

translation unit 沒有定義 a,

所以先接受有 a,先 compile,

link 階段再連結。

definition of object : 在 memory 配置一塊 空間儲存其值,

link phase時, linker 會去連結變數。

definition 可以用在 define union test1,define object,不是每個定義,都會配置 memory:

最新文章

  1. poj 3728(LCA + dp)
  2. 敏捷项目开源管理软件ScrumBasic(2)- 多项目支持
  3. OpenSSL-for-IOS
  4. C#_加密解密
  5. jQuery toggle方法的一个奇怪表现。
  6. WPF——执行命令清空文本框
  7. Java中List和ArrayList的区别(转)
  8. [AngularJS + Webpack] Uglifying your JavaScript
  9. windows服务(Windows Installer问题,错误5:拒绝访问)
  10. HTML5面试题-备
  11. codeforces 416B. Appleman and Tree 树形dp
  12. 【oracle案件】ORA-19502,ORA-27072
  13. C#中对属性和字段的理解
  14. easyui 翻译
  15. Linux CentOS下MySQL的安装配置之浅谈
  16. TileMap Editer 编辑器工具介绍
  17. for 没有作用域的说话
  18. 细数那些不懂Spring底层原理带来的伤与痛
  19. ADB 运行原理
  20. python使用Fabric模块实现自动化运维

热门文章

  1. 【转】C++中map容器的说明和使用技巧
  2. JAVA基础篇—模拟服务器与客户端通信
  3. 字符串:HDU5371-Hotaru's problem(manacher 的应用)
  4. Leetcode23---&gt;Merge K sorted Lists(合并k个排序的单链表)
  5. python - work - 2
  6. python中用exit退出程序
  7. linux快速查看同局域网的其他在线主机
  8. 我的PC必装软件
  9. Python循环语句 if while for
  10. rabbitmq exchange type