gcc 4.4.3 c89
I have the following source code. And getting a stack dump on the printf.
char **devices; devices = malloc(10 * sizeof(char*)); strcpy(devices, "smxxxx1"); printf("[ %s ]\n", devices); /* Stack dump trying to print */
I am thinking that this should create an char array like this.
devices devices devices devices etc
And each element I can store my strings.
Many thanks for any suggestions,
© Stack Overflow or respective owner