title: Comparing LPCWSTR in if()
body: <p>I feel like I am missing something very obvious here...</p>
  
  <p>In my program, I read user input from an edit box using <code>GetWindowText()</code>,<br>
  followed by this code:</p>
  
  <pre><code>if (x == L"R" || x == L"C" || x == L"L"){ n = 1; }
  else{ n = 9; }
  </code></pre>
  
  <p>The debugger clearly says that <code>x</code> is <code>L"R"</code>, but <code>n</code> is getting set as 9.  </p>
  
  <p><img src="https://i.stack.imgur.com/UXrZx.png" alt="debugger"> </p>
  
  <p>Is using <code>if()</code> in this situation wrong and should I use something else?</p>