Having such simple code:
DWORD i = 0xFFFFFFF5; // == 4294967285(signed) == -11(unsigned)
if((unsigned)i == -11)
OutputDebugString(L"equal");
else
OutputDebugString(L"not equal");
The condition is meet - i'm getting "equal" output.
My question is WHY is that happen since in the condition we have
f(4294967285 == -11)
considering the explicit unsigned
cast on the left side of the operator? Why is the cast ignored?