title: managed c++ string compare working oddly
body: <p>I am trying to compare 2 strings but getting weird results. On some computers, the comparison works correctly and on others, it does not. The codes is written in Visual Studio 2010 using managed C++.I have checked the strings and they look identical. Any thoughts?</p>
  
  <pre><code>String^ str1 = "string1";
  char[] chars = "string1";
  String^ str2 = new String(chars);
  if(String::Compare(str1,str2)==0)
      return true;
  else
      return false;
  </code></pre>