C++?????????????????????
???????????? ???????[ 2014/12/16 14:20:54 ] ????????C++ ???? ???
????????????????????γ??????????????????????д?Щ???????C++?????????????????????????????????????????????????????????????????????????????????????
?????????????????
????1?????????????????????б???????????е????????????????????????????????????????????????????????У???????????????е?????顣???????????????????CPP?????OBJ?????
????2?????????????C++?????????CPP??????????????????????????????????????????????
????3?????????????????????????????????????????????????????е???????????????Щ???????????δ??????????????????????????????????????????????????????
????????C++???????????????Translation Unit????????.cpp??????????include??????.h?????.h??????????????????????????.cpp??????????????????.cpp???????.obj????????????PE??Portable Executable????Windows????????????????????????????????????????????????????У?????????????????????main??????????????????????????????.cpp??????????????????????????????????????????.exe??.dll?????
??????????????????????±???????????????
?????????????????????????????????????????????????????A.cpp???????????壺
????int n = 1;
????void FunA()
????{
????++n;
????}
?????????????????????A.obj??????????????????Σ????????????????????????????n??FunA??????????????????????????????????????
????????? ???? ????
????0x0000 n 4
????0x0004 FunA ??
???????????????????????????????????????????????????δ????????????????????????????????????????0x0000?????
????FunA????????????????£?
????0x0004 inc DWORD PTR[0x0000]
????0x00?? ret
???????++n??????????inc DWORD PTR[0x0000]????????????0x0000λ??????DWORD??4??????1??
?????????????B.cpp????????????£?
????extern int n;
????void FunB()
????{
????++n;
????}
???????????B.obj?????????????
????????? ???? ????
????0x0000 FunB ??
??????????????n??????????n???????extern?????extern???????????????n???????????????????????????????????????????????????????????????????????n???????????????????FunB??а?????n?????????????FunB???????????
????0x0000 inc DWORD PTR[????]
????0x00?? ret
??????
???·???
??????????????????
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