title: copying arrays of strings in C++
body: <p>I have an array of variables of type string. Something like:</p>
  
  <pre><code>std::string Array1[3] = {"A","B","C"}; 
  </code></pre>
  
  <p>I would like to copy the contents of this array into another one: </p>
  
  <pre><code>std::string Array2[3]; 
  </code></pre>
  
  <p>At the moment I use a loop to do this. Is there any 
  simpler/alternative way? Also if I declare and initialise the variable 
  as follows: </p>
  
  <pre><code>if( ... check some condition ... ) 
  {
      .
      .
      std::string Array1[3] = {"A","B","C"}; 
  }  
  </code></pre>
  
  <p>it will obviously be destroyed once leaving the scope of the if statement. Is there 
  a way of avoiding this so that it can be used later in the function. Ideally I would like to avoid declaring the variable Array1 global. </p>
  
  <p>Thanks </p>