Tuesday, August 2, 2011

Disable compilation warning using pragma

Compiler warning can be disabled for a part of the code using #pragma.

#pragma warning(disable:4700)
//your code here
.
.
#pragma warning(default:4700) // restores the default behavior.