title: Using strsep() with dynamic array of strings in C
body: <p>I have the following code:</p>
  
  <pre><code>#include &lt;string.h&gt;
  
  int main(void) {
      char *buffer = NULL, **words = NULL, *aPtr = NULL, *sPtr;
      int count = 0;
  
      buffer = strdup("The quick brown fox jumps over the lazy dog");
      sPtr = buffer;
  
      do {
          aPtr = strsep(&amp;sPtr, " ");
  
          words[count++] = ... // missing code
      } while(aPtr);
  
      return 0;
  }
  </code></pre>
  
  <p>I'm missing some code as you can see above... Is there any kind of strdup() that works on this situation? The strdup() function itself doesn't seem to work... If there isn't one, how can I make this piece of code work?</p>
  
  <p>Pointer of pointer is headache for me...</p>