title: What does _CRT_SECURE_NO_WARNINGS actually mean?
body: <p>I've been getting this C4996 error in visual studio as a result of using the <code>scanf()</code> function.</p>
  <p>It turned out that the solution to this problem is adding the line <code>_CRT_SECURE_NO_WARNINGS</code> to Configuration Properties -&gt; C/C++ -&gt; Preprocessor -&gt; Preprocessor Definitions -&gt; Edit.</p>
  <p>It fixed the problem perfectly, but I could not find a proper explanation of the actual meaning of this thing.
  If it disables <strong>warnings</strong>, why did my program crash at first place?
  What is &quot;CRT&quot;?</p>
  <p>An example of a crashing program:</p>
  <pre><code>#include &lt;stdio.h&gt;
  main()
  {
      int number;
      printf(&quot;enter a number\n&quot;);
      scanf(&quot;%d&quot;, &amp;number);
  }
  </code></pre>
  <p>And the error message:
  <a href="https://i.stack.imgur.com/5mAo4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5mAo4.png" alt="The _CRT_SECURE_NO_WARNINGS error message" /></a></p>