????С???c?????????????????
???????????? ???????[ 2013/3/11 11:05:06 ] ????????
???????????????????????linux?3????window??δ???????????????????????????c??????
????C???????????????????c?????????????????????????????????????????????????????????????????????????????????λ??
?????????????????????
??????c?????У???????????????????????????δ??????????????????????????????????????????????????????????????????????????
??????????????????
?????????????????????????????????????
?????????????????????????????
???????????壺
?????????
//main.c
#include <stdio.h>
int fun();
int x;
int main()
{
printf("in main.c:x=%p
"?? &x);
fun();
return 0;
}
//test.c
#include <stdio.h>
int x;
int fun()
{
printf("in test.c:x=%p
"?? &x);
return 0;
}
????????gcc main.c test.c?????У??????
????in main.c:x=0x80496a8
????in test.c:x=0x80496a8
????????x??????????????????????????????????????extern???
?????????
//main.c
#include <stdio.h>
int fun();
int x;
int main()
{
printf("in main.c:&x=%p
"?? &x);
fun();
return 0;
}
//test.c
#include <stdio.h>
struct
{
<SPAN style="WHITE-SPACE: pre"> </SPAN>char a;
<SPAN style="WHITE-SPACE: pre"> </SPAN>char b;
<SPAN style="WHITE-SPACE: pre"> </SPAN>char c;
<SPAN style="WHITE-SPACE: pre"> </SPAN>char d;<SPAN style="WHITE-SPACE: pre"> </SPAN>
<SPAN style="WHITE-SPACE: pre"> </SPAN>int t;
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11