From VC 2005 debug Version
void FuncNoRef(int i)
{
i = 2;}
void FuncUseRef(int & i)
{
i = 1;
}
int main(int argc, char * argv[])
{
int j = 0;
FuncNoRef(j);printf("%d/n", j);
FuncUseRef(j);
printf("%d/n", j);
return 1;
}
call FuncNoRef(int i)
00411445 mov eax,dword ptr [j] 00411448 push eax 00411449 call FuncNoRef (41100Ah) |
in FuncNoRef(int i)
004113FE mov dword ptr [i] , 1 |
call FuncUseRef(int & i)
0041146C lea eax,[j] 0041146F push eax 00411470 call FuncUseRef (4110AAh) |
in FuncUseRef(int & i)
004113FE mov eax,dword ptr [i] 00411401 mov dword ptr [eax],1 |
here is result:
0,
1