Using Double Pointers after memory allocated within function
C is pass by value. The value assigned to table is lost on returning from InitStringTable(). Also when allocating pointers to char ask for room for pointers to char. So this: … = (char**)malloc(sizeof(char)*10); shall at least be (assuming C): … = malloc(sizeof(char*)*10); A possible approach to this would be: #include <stdlib.h> #include <string.h> #include … Read more