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];
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];
Environment: OS X, GCC / G++
Codes: Java, C#, C/C++
AOL IM: neandrake, Email: neandrake (at) gmail (dot) com
It declares an array of pointers to char.
-Prelude
My best code is written with the delete key.
so how could i make an array of pointers to character arrays?
Environment: OS X, GCC / G++
Codes: Java, C#, C/C++
AOL IM: neandrake, Email: neandrake (at) gmail (dot) com
from this :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
My best code is written with the delete key.
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?