Possible Duplicate:
Split string with delimiters in C
What's the best way to split a "," separated list into an array in C. I know how many things are in the list.
char list = "one,two,three,four";
int ENTServerAmount = 8;
char **ENTServer;
ENTServer = malloc(sizeof(char *) * ENTServerAmount);
*** Code that splits "list" into "ENTServer" ***
Also I'm not very good at allocating so let me know if my allocation statement is wrong.