Created
January 9, 2015 03:07
-
-
Save beerbong/f0e50b9cf7d415d57106 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
char** names = (char**)malloc(z_alloc * sizeof(char*)); | |
int num = 0; | |
for (; num < z_size - 1; num++) { | |
// here i am just duplicating the string | |
// but names[num] should be " - " + zips[num] | |
// everything i tried provokes an overflow error | |
names[num] = strdup(zips[num]); | |
} | |
names[z_size] = NULL; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment