Originally Posted by
Blasz
This is on unix/linux btw. I don't know if that would limit the number of people being able to help me with this.
You'd be amazed. I'd guess more than half the people on here use linux often enough.
I see some possible problems:
Code:
char ***array1
char **x = (char **)malloc(sizeof(char*)*10);
a.array1 = &x;
Why do you want to do this? What's wrong with:
Code:
char **array1
char **x = malloc(sizeof(char*)*10);
a.array1 = x;
Certainly, this could lead to wonky stuff here:
Code:
sscanf(buffer, "%s", *b.array1[pthread_self()-2]);
Which would be better written:
Code:
sscanf(buffer, "%s", b->array1[pthread_self()-2]);
Otherwise, it could mean:
Code:
*(b.array1[pthread_self()-2])
// which is not the same as
(*b).array1[pthread_self()-2]
Altho I'm not too sure what you want because of the triple pointer...