title: c++ pass char array to function and change it
body: <p>I try to make a function that can change the content of a specified char array</p>
  
  <pre><code>void change_array(char *target)
  {
      target="hi";
  }
  
  int main()
  {
      char *a[2];
      change_array(a[1]);
      cout&lt;&lt;*(a[1]);
  }
  </code></pre>
  
  <p>But then the content of a[1] stays at 0x0(void)</p>