Reputation: 41
Is it possible? I don't want to disable the warning globally as I want to check my own header files for warnings.
Upvotes: 4
Views: 630
Reputation: 13560
You can disable warnings around the include of the external header file:
#pragma warning( push )
#pragma warning( disable: the warning)
// include here
#pragma warning( pop )
If you need to include the header multiple times, you can create a header with the pragmas and include that instead. The same question was asked here.
Upvotes: 4