title: C++: copy array
body: <p>Is it possible to do something like this in C++ (can't test it myself right now)?</p>
  
  <pre><code>int myarray[10] = {111,222,333,444,555,666,777,888,999,1234};
  
  void functioncc()
  {
   int temparray = myarray;
   for(int x=0; x&lt;temparray.length; x++){
      .... do something
   }
  
  }
  </code></pre>
  
  <p>And maybe this (but i dont think it is):</p>
  
  <pre><code>int array1[5] = {0,1,2,3,4,5,6,7,8,9};
  int array2[5] = {9,8,7,6,5,4,3,2,1,0};
  
  void functioncc(int arid)
  {
    temparray[10] = "array"+arid;
    ........
  
  }
  </code></pre>
  
  <p>I can do stuff like that in JavaScript, but like I said - don't think it would be possible in C++.</p>
  
  <p>Thanks for your time.</p>