title: Initializing array of pointers to char
body: <p>When I try to compile the following code I receive an error: "Type error in argument 1 to 'allocate'; found 'char * *', expected 'char *" at the line indicated (&lt;&lt;&lt;&lt;&lt;). Explanations would be appreciated.</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;string.h&gt;
  
  void allocate(char *dt);
  
  int  main(void)
  {
    char *data[3];
  
    allocate(data); &lt;&lt;&lt;&lt;&lt;
      return 0;
  }
  
  void allocate(char *dt)
  { 
    int i;
    char buf[] = "A test string";
  
    for (i = 0; i &lt; 3; i++){
      strcpy(&amp;dt[i], buf);
      printf("%s\n", dt[i]);
    }
  } 
  </code></pre>
  
  <p>My understanding is that I should call allocate thus: allocate(&amp;data) but with this I receive the following error: "Type error in argument 1 to 'allocate'; found 'char * (*)[3]', expected 'char *'".</p>
  
  <p>It should be obvious that I am trying to make the contents of *data[] == buf.</p>