title: Strok spaces using buffer/dynamic memory
body: <p>how could I strtok at spaces while reading in data from a buffer? If my text file contained</p>
  
  <p>1 23 50</p>
  
  <p>45 50 30</p>
  
  <p>2 15 30</p>
  
  <p>and I decide to print the array with my code below, it will print line by line. How could I extend this to further divide the array into individual numbers for each index of the array? Eg.</p>
  
  <p>1</p>
  
  <p>23</p>
  
  <p>50, etc...</p>
  
  <p>I've tried playing around with strtok but I keep segfaulting and I wasn't sure where to fix it.</p>
  
  <pre><code>FILE * fp;
  char buffer[5000];
  int size = 0;
  char **entireFile = NULL;
  fp = fopen("file.txt","r");
  
  entireFile = malloc(sizeof(buffer) * sizeof(char*));
  
  while (fgets(buffer,5000,fp)!= NULL)
  {
      entireFile[size] = malloc(strlen(buffer)+1);
      strcpy(entireFile[size],buffer);         
      size++;
  }
  </code></pre>