title: add watch shows undefined identifier visual studio 2012, cpp
body: <p>I encounter the strangest behavior in VS 2012 (I'm writing in cpp).</p>
  
  <p>I click "add watch" on a variable and it says "identifier  is undefined". </p>
  
  <p>Here's an example of the code: </p>
  
  <pre><code>for (int j=0;j&lt;32;j++)
          {
              unsigned char curValue=desc1.at&lt;unsigned char&gt;(0,j);
              printf("%s\n",curValue);    
          }
  </code></pre>
  
  <p>I had to use printf to show the value of curValue. lol. </p>
  
  <p>Has anyone encountered such behavior?</p>
  
  <p>Edit: more strange this occur. When debugging the following code:</p>
  
  <pre><code>    int b1[8];
  
      for (int k=0;k&lt;7;k++)
          b1[k]=0;
  
      char q=curValue; 
      int t=0;
      while (q!=0){
          b1[t++]=q%2;
          q=q/2;
      }
  </code></pre>
  
  <p>The debugger just skips the loop with b1[k]=0;</p>
  
  <p>Please note curValue is undefined even inside the loop.</p>
  
  <p>Thanks!</p>