Hi everyone,

I already know how to create an one-dimensional Array of Strings:
Code:
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:
Code:
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!

Last edited by dice; 11/01/11 22:06.