Monday, December 9, 2013

disabling warnings in MS VS

Used to have to do this, this posting shows how to do a bad practice.  It does however have an example of how to disable warnings in c++ on VS.

// document here exactly why you can not use strncpy_s
#pragma warning( push )
#pragma warning( disable : 4996 )
// your code that uses strncpy instead of strncpy_s
#pragma warning( pop ) 
 
how-to-achieve-strncpy-functionality-with-strncpy-s-function

No comments:

Post a Comment