I found this quiet interesting, when I was reading an article about disassembly in C++.
The original article:
[Only registered and activated users can see links. Click Here To Register...]
What do you think?
I found it really interesting, because I didn't know the variable actually existed outside the if statement without being defined outside.Quote:
One of the main statements people use is this if statement which logically compares values. Using this function we can choose which path of execution our program should take.
If statement can also be very , very complex and very simple
Take a look at the following examples.
Now what if we had something like thisCode:If(I ==0) //do function //continue
Because of this we know that compiler generates a stack frame for each If statement with brackets right? Wrong!.Code:If(I==0) { int i2 = 0; } i2 = 3; //error can't access i2 because it's not in your scope // it's in the if statements scope
I2 is accessible to main in reality but the compiler keeps it hidden, the reason I'm telling you this is because to reverse engineer if statements you must completely understand them.
The original article:
[Only registered and activated users can see links. Click Here To Register...]
What do you think?