title: C++ variable can't be duplicated from a variable
body: <p><code>p1_choice</code> variable stores data correctly, but can't replicate\overwrite  the <code>ttt</code> array.</p>
  <p>I want to store the data gained from the user in <code>p1_choice</code> variable to <code>ttt[0}</code> array.</p>
  <pre><code>#include &lt;iostream&gt;
  #include &lt;cmath&gt;
  
  using namespace std;
  
  //CREATING VARIABLES
  string ttt[9] = { &quot;1&quot;, &quot;2&quot;, &quot;3&quot;, &quot;4&quot;, &quot;5&quot;, &quot;6&quot;, &quot;7&quot;, &quot;8&quot;, &quot;9&quot; };
  string p1_choice;
  int p2_choice;
  int gametime = 20;
  
  int main()
  {
      while (gametime &lt; 21) {
          cout &lt;&lt; endl;
          gametime++;
          cout &lt;&lt; &quot;::: &quot; &lt;&lt; ttt[0] &lt;&lt; &quot; :: &quot; &lt;&lt; ttt[1] &lt;&lt; &quot; :: &quot; &lt;&lt; ttt[2] &lt;&lt; &quot; :::&quot; &lt;&lt; endl;
          cout &lt;&lt; &quot;::: &quot; &lt;&lt; ttt[3] &lt;&lt; &quot; :: &quot; &lt;&lt; ttt[4] &lt;&lt; &quot; :: &quot; &lt;&lt; ttt[5] &lt;&lt; &quot; :::&quot; &lt;&lt; endl;
          cout &lt;&lt; &quot;::: &quot; &lt;&lt; ttt[6] &lt;&lt; &quot; :: &quot; &lt;&lt; ttt[7] &lt;&lt; &quot; :: &quot; &lt;&lt; ttt[8] &lt;&lt; &quot; :::&quot; &lt;&lt; endl;
  
          cout &lt;&lt; &quot;PLAYER 1 ENTER YOUR COICE HERE........&quot;;
          cin &gt;&gt; p1_choice;
          cout &lt;&lt; p1_choice &lt;&lt; endl;
          p1_choice = ttt[6];
          cout &lt;&lt; &quot;::: &quot; &lt;&lt; ttt[6]
      }
  
      return 0;
  }
  </code></pre>