title: Static bool variable in c++ Method
body: <p>I have a simple code that behaves differently from what I expected. I would really love some insights and thoughts. </p>
  
  <p>I have a simple code in member function that looks like that :</p>
  
  <pre><code>SOME~MEMBER~FUNCTION~IMPLEMENTATION
  {
  static bool a = false;
  
  m_b = a; //m_b is a Boolean member of the parent class
  }
  </code></pre>
  
  <p>before the assignment (m_b = a) on watch window I see m_b with 1 value and a with 0 value.</p>
  
  <p>after the assignment (m_b = a) I would expect b to have a false value.
  but when I check its value with a debugger watch window it shows 2 value and not 0, which always yields true.</p>
  
  <p>anyone has any idea what am I missing? it looks simple but I dont really get what went wrong</p>
  
  <p>more information : 
  when i do if(a) it treats a like a true value, although it shows its a 0 on watch window, and its initiated with false.
  really confusing</p>