Once in a while it\'s difficult to write C++ code that wouldn\'t emit warnings at all. Having warnings enabled is however a good idea. So it is often necessary to disable wa
The first approach allows you change the specific warning setting in a local scope. It first stores all the current warning state by push into stack, apply your warning modifications, then restore (pop) to last warning state.
#pragma warning( push ) #pragma warning( once: ThatWarning ) //code with ThatWarning here #pragma warning( pop )