????c++?в??????????????????????
???????????? ???????[ 2013/5/29 10:02:50 ] ????????
??????????c++?????
class X {
public:
int i;
int j;
~X() {}
};
void f(X x) {
X x1;
x.i = 1;
x.j = 2;
}
int main() {
f(X());
}
??????????main??????????
_main PROC
; 15 : int main() {
push ebp
mov ebp?? esp
sub esp?? 8;???????????8byte????????????????幹??????
;????????????±?????????????????????????????????????????
; 16 : f(X());
mov eax?? DWORD PTR $T2560[ebp+4];??????????????????4byte????????????eax?????????????????????j???eax
push eax;??eax??
mov ecx?? DWORD PTR $T2560[ebp];??????????????е??????ecx??????????????е???????i???ecx
push ecx;??ecx??
;???????????????????????????????????????f
call ?f@@YAXVX@@@Z ; ???ú???f
add esp?? 8;????????????8byte???????????????????????
lea ecx?? DWORD PTR $T2560[ebp];????????????????ecx
call ??1X@@QAE@XZ ; ???????????????????
; 17 : }
xor eax?? eax
mov esp?? ebp
pop ebp
ret 0
_main ENDP
??????????????????????????????????????????????????????????????
??????
![](/images/ad-banner/ad-banner.png)
???·???
??????????????????
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