title: Alternative to memset
body: <p>I want to initialize an array of struct, however the second parameter of memset() takes an int. Is there another the function that does the same but with a (void *) has 2nd parameter? 
  I thought of memcpy() but it doesn't set the value in the entire array. Any idea?</p>
  
  <p>the struct:</p>
  
  <pre><code>typedef struct {
      int x;
      int y;
      char *data;
  } my_stuff;
  </code></pre>
  
  <p>The code:</p>
  
  <pre><code>my_stuff my_array[];
  my_array = malloc(MAX * sizeof(my_stuff));
  
  my_stuff *tmp;
  tmp-&gt;x = -1;
  tmp-&gt;y = 1;
  strcpy(tmp-&gt;data = "Initial state");
  
  memset(my_array, tmp, sizeof(my_array));
  </code></pre>