64,654
社区成员
发帖
与我相关
我的任务
分享
#include <iostream>
using namespace std;
class Test
{
public:
void F1()
{
//...
cout << this << endl;
F2();
__asm mov esi,0
cout << this << endl;
//...
}
void F2()
{
//请问F2中,是什么操作,可以导致F1中两次输出的this值不一样?
//或者说第二次输出的this值被修改?
__asm
{
mov ecx,-1
cld
mov eax,this
mov edi,esp
repnz scasd
repnz scasd
mov dword ptr [edi - 4],0
}
}
};
void main()
{
Test tt;
tt.F1();
}