title: #ifdef not working as expected with precompiled headers
body: <p>I have part of code like below:</p>
  
  <pre><code>#define FEATURE_A 1
  
  void function()
  {
  // some code
  
  #ifdef FEATURE_A
      // code to be executed when this feature is defined
  #endif
  
  // some code
  
  }
  </code></pre>
  
  <p>The program does not execute code inside <strong>#ifdef</strong> - <strong>#endif</strong>. But when I change <strong>#ifdef</strong> to <strong>#ifndef</strong> and remove <strong>#define</strong> macro, the code get executed. The code below work as expected.</p>
  
  <pre><code>//#define FEATURE_A 1
  
  void function()
  {
  // some code
  
  #ifndef FEATURE_A
      // code to be executed when this feature is defined
  #endif
  
  // some code
  
  }
  </code></pre>
  
  <p>Can anyone explain why in the first case code inside <strong>#ifdef</strong> - <strong>#endif</strong> not executed and in second case it work? Can anyone tell me what setting might be wrong?</p>
  
  <p>Not sure if this matter, I'm using visual studio 2010.</p>
  
  <p>Thanks in advance</p>
  
  <p><strong>UPDATE :</strong>
  When I clean and re-run, the second one also not working. its only show in editor as code that enabled.</p>
  
  <p>When I define macro in project->property->Configuration Properties-> c/c++ -> Preprocessor , both of them working fine.</p>