title: C 2 Dimensional Char in Struct
body: <p>i'm trying to read input into a 2dim char struct member, </p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;string.h&gt;
  
  enum { HIGHT=14, WIDTH=147, IMAGES=24 };
  
  typedef struct{
      char *frame[HIGHT][WIDTH];
      int fps;
  } frame_stack_t;
  
  void out(frame_stack_t *frame_stack[IMAGES]);
  
  int main(){
      frame_stack_t *frame_stack[IMAGES];
  
      for (int i=0; i&lt;IMAGES; i++){
          for (int j=0; j&lt;HIGHT; j++){
              strcpy( frame_stack[i]-&gt;frame[j], "some text" );
          }
      }
  
      out(frame_stack);
  }
  
  void out(frame_stack_t *frame_stack[IMAGES]){
      for (int i=0; i&lt;IMAGES; i++){
          for (int j=0; j&lt;HIGHT; j++){
              printf("%s",frame_stack[i]-&gt;frame[j]);
          }
      }
  }
  </code></pre>
  
  <p>It look right to me, but I recive the following output:</p>
  
  <pre><code>test_struct.c: In function ‘main’:
  test_struct.c:19:25: warning: passing argument 2 of ‘strcpy’ from incompatible pointer type [-Wincompatible-pointer-types]
      strcpy( "some text", frame_stack[i]-&gt;frame[j] );
                           ^
  In file included from test_struct.c:3:0:
  /usr/include/string.h:125:14: note: expected ‘const char * restrict’ but argument is of type ‘char **’
   extern char *strcpy (char *__restrict __dest, const char *__restrict __src)
                ^
  test_struct.c: In function ‘out’:
  test_struct.c:29:11: warning: format ‘%s’ expects argument of type ‘char *’, but argument 2 has type ‘char **’ [-Wformat=]
      printf("%s",frame_stack[i]-&gt;frame[j]);
             ^
  Speicherzugriffsfehler
  </code></pre>
  
  <p>with gdb telling me that strcpy failed</p>
  
  <pre><code>Program received signal SIGSEGV, Segmentation fault.
  __strcpy_sse2_unaligned () at ../sysdeps/x86_64/multiarch/strcpy-sse2-unaligned.S:546
  546 ../sysdeps/x86_64/multiarch/strcpy-sse2-unaligned.S: Datei oder Verzeichnis nicht gefunden.
  </code></pre>
  
  <p>Can someone please tell me whats wrong here?</p>