Hi everyone,
I already know how to create an one-dimensional Array of Strings:
myString = malloc((int) sizeof(STRING*) * 5);
for(int i = 0; i < 5; i++)
myString[i] = str_create("");
But how to create a multidimensional Array with this method? I tried sth like this:
myString = malloc((int) sizeof(STRING*) * 5);
for(int i = 0; i < 5; i++)
myString[i] = str_create("");
for(int i = 0; i < 5; i++) {
myString[i] = malloc((int) sizeof(STRING*) * 5);
for(int k = 0; k < 5; k++)
myString[i][k] = str_create("");
}
But it wont work...
Help me please ;D
GreetZ
dice!