title: c++ string.compare don't accept space characters
body: <p>First I want to apologist about my bad title. Now the problem. I'm trying to compare two strings in C++. I had try with string.compare and ==, none of them worked. Here is code</p>
  
  <pre><code>if(game_type == "AI vs AI"){
      std::cout&lt;&lt;"You choosed AI vs AI\n";
      aiVsAI(range);
  }
  else{
  std::cerr &lt;&lt;"Error";
  }
  </code></pre>
  
  <p>and with string.compare</p>
  
  <pre><code>if(game_type.compare("AI vs AI") == 0){
      std::cout&lt;&lt;"You choosed AI vs AI\n";
      aiVsAI(range);
  }
  else{
      std::cerr &lt;&lt;"Error";
  }
  </code></pre>
  
  <p>If I give AIvsAI for input the program works correctly, but if i enter AI (space) vs (space) AI, the program prints "Error". I tried using \x20 instant of space but this didn't work too. Any ideas why this is happening?</p>