title: Commenting out C++ code, visual studio
body: <p>I am testing a C++ source and I want to comment out some part of the code. There is a shortcut in Visual Studio: <kbd>Ctrl+K</kbd> and <kbd>Ctrl+C</kbd> for commenting and <kbd>Ctrl+K</kbd> and <kbd>Ctrl+U</kbd> for uncommenting the code. I can successfully comment out the code but uncommenting it will not be an "undo". It always removes some characters from the existed comment lines. Here is an example:</p>
  
  <pre><code>/*function 1 */
  int func1()
  {
      return 0;
  }
  </code></pre>
  
  <p>If I want to comment out this code, I can apply <kbd>Ctrl+K</kbd> and <kbd>Ctrl+C</kbd> after selecting the code. And it becomes like this:</p>
  
  <pre><code>///*function 1 */
  //int func1()
  //{
  //    return 0;
  //}
  </code></pre>
  
  <p>If I want to un-comment the code, I should apply <kbd>Ctrl+K</kbd> and <kbd>Ctrl+U</kbd> after selecting it all. It becomes:</p>
  
  <pre><code>*function 1 */
  int func1()
  {
      return 0;
  }
  </code></pre>
  
  <p>It removes an additional <code>'/'</code> and the old comment becomes corrupted. Is this a normal behavior or am I doing something wrong?</p>