what exactly does that do? does it create an array of character pointers or a pointer to a character array? wha?Code:char *my_array[12];
Printable View
what exactly does that do? does it create an array of character pointers or a pointer to a character array? wha?Code:char *my_array[12];
It declares an array of pointers to char.
-Prelude
so how could i make an array of pointers to character arrays?
from this :Quote:
so how could i make an array of pointers to character arrays?
char *my_array[12];
my_array[0]=new char[99];
then
strcpy(my_array[0], "Well, Done!");
>so how could i make an array of pointers to character arrays?
Unless my mind has completely left me:
char *(*array[10])[10];
will give you an array of 10 pointers to an array of 10 char pointers.
-Prelude
neandrake: what are you trying to do? Create an array of strings? learn about arrays/pointers? Do you have an example of how you tried to use the line you posted and had trouble using/understanding it?