Disabling Warnings generated via _CRT_SECURE_NO_DEPRECATE

前端 未结 10 1619
说谎
说谎 2020-12-02 06:00

What is the best way to disable the warnings generated via _CRT_SECURE_NO_DEPRECATE that allows them to be reinstated with ease and will work across Visual Stud

10条回答
  •  误落风尘
    2020-12-02 06:20

    For the warning by warning case, It's wise to restore it to default at some point, since you are doing it on a case by case basis.

    #pragma warning(disable: 4996) /* Disable deprecation */
    // Code that causes it goes here
    #pragma warning(default: 4996) /* Restore default */
    

提交回复
热议问题