char szString[3][40];
char **szString = 0;
char **strArray = (char**)calloc(20, sizeof(char*));
char **strArray = (char**)calloc(20, sizeof(char*)); char *derp = "literal static string"; //now, i don't want to risk the "derp" variable being collected or modified somewhere during runtime, so I'll create my own copy of the string (not the pointer to the string, the string itself. strArray[0] = strdup(derp);
char** == *char[]
sprintf(szServerRequestArray[i - 2], "somestring %i some string %i some string", WhichOne, i);
char buffer[256]; //other code sprintf(buffer, "somestring %i some string %i some string", WhichOne, i); szServerRequestArray[i - 2] = strdup(buffer);