title: C compound literals, pointer to arrays
body: <p>I'm trying to assign a compound literal to a variable, but it seems not to work, see:</p>
  
  <pre><code>  int *p[] = (int *[]) {{1,2,3},{4,5,6}};
  </code></pre>
  
  <p>I got a error in gcc.</p>
  
  <p>but if I write only this:</p>
  
  <pre><code>  int p[] = (int []) {1,2,3,4,5,6};
  </code></pre>
  
  <p>Then it's okay.</p>
  
  <p>But is not what I want.</p>
  
  <p>I don't understand why the error occurrs, because if I initialize it like a array, or use it with a pointer of arrays of chars, its okay, see:</p>
  
  <pre><code>  int *p[] = (int *[]) {{1,2,3},{4,5,6}}; //I got a error
    int p[][3] = {{1,2,3},{4,5,6}}; //it's okay
    char *p[] = (char *[]) {"one", "two"...}; // it's okay!
  </code></pre>
  
  <p>Note I don't understand why I got an error in the first one, and please I can't, or I don't want to write like the second form because it's needs to be a compound literals, and I don't want to say how big is the array to the compiler. I want something like the second one, but for int values.</p>
  
  <p>Thanks in advance.</p>