LKBEN11682: How to disable a warning in visual studio.


Symptom

A warning is blocking your compilation.

Cause

Wenn a function is listed as deprecated, it results in a compilation error. Disabling the warning can solve this problem.

Solution

To disable a warning in visual studio, you can place a pragma in your c++ file.

#pragma warning(disable : 4996)

This Pragma will disable a C4996 Error. Please note that you only need the number. (the part after the C)

Have fun.

Disclaimer:

The information provided in this document is intended for your information only. Lubby makes no claims to the validity of this information. Use of this information is at own risk!

About the Author

Author: Wim Peeters - Keskon GmbH & Co. KG

Wim Peeters is electronics engineer with an additional master in IT and over 30 years of experience, including time spent in support, development, consulting, training and database administration. Wim has worked with SQL Server since version 6.5. He has developed in C/C++, Java and C# on Windows and Linux. He writes knowledge base articles to solve IT problems and publishes them on the Lubby Knowledge Platform.

Latest update: 26-10-2023