Skip to content

Instantly share code, notes, and snippets.

@lalala
Created January 2, 2012 04:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lalala/1549346 to your computer and use it in GitHub Desktop.
Save lalala/1549346 to your computer and use it in GitHub Desktop.
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
int main() {
char** s = NULL;
char delim[] = " ";
char* tok = NULL;
s[0] = "this is a string";
tok = strtok(s[0], delim);
while(tok != NULL) {
printf("%s\n", tok);
tok = strtok(NULL, delim);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment