Dan
Dan

Reputation: 341

Suppress deprecation warning for one line of code? (C++)

How do you suppress the deprecation warning for one line of code?

Upvotes: 2

Views: 836

Answers (1)

Dan
Dan

Reputation: 341

This code should accomplish what you're trying to do.

#pragma warning(push)
#pragma warning(disable: WARNING_CODE) //4996 for _CRT_SECURE_NO_WARNINGS
// Insert deprecated code here
#pragma warning(pop)

Upvotes: 2

Related Questions