This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

C6747工程变量怎么共用内存地址了

你好,我最近调试项目时发现如下这种情况:

我在一个c文件里定义了两个全局变量,unsigned int num; 和 unsigned int date[]; 。调试时发现num分配的地址是0x118000d4;date数组分配的首地址是0x118000d0。结果是当date数组有很多数据存放时,就会把num的值给覆盖了,不知道应该怎样才能避免这种情况发生呢?