SUPPRESSING SECURITY WARNINGS

old c functions are considered a security risk. by default, modern compilers such as Visual Studio will not let a programmer compile or run a program that may contain old c functions such as 'scanf.' IOT suppress the warnings and bypass the restriction, follow the steps below.

METHOD 1: VIA PREPROCESSOR CONFIG

Visual Studio > File > Open > Project/Solution > {projectName}
{projectName} > Project > {projectName} Properties > Configuration Properties > C/C++ > Preprocessor
 Preprocessor Definitions > Edit
  _CRT_SECURE_NO_WARNINGS

METHOD 2: VIA MACRO

#define _CRT_SECURE_NO_WARNINGS
 * this compiler flag will suppress and disable the scanf error and warnings
    - this flag must be added before any #include files to work!

Last updated