title: VIsual Studio says that I have error in the string
body: <pre><code>#include "stdafx.h"
  #include &lt;iostream&gt;
  
  using namespace std;
  
  int main() {
      int temp;
      string phase;
      cout &lt;&lt; "the temperature is: ";
      cin &gt;&gt; temp;
  
      if (temp &gt; 0 &amp;&amp; temp &lt; 100) {
          phase = "liquid";
  
      }
      else if (temp &lt; 0)
          phase = "ice";
      else
          phase = "gas";
  
      cout &lt;&lt; "the phase is :" &lt;&lt; phase &lt;&lt; endl; 
  
  
      return 0;
  }
  </code></pre>
  
  <p>I write C++ and I have can't display the variable phase . This also stops the compiler and I can't compile it.</p>