This is not an array of characters. This is an array of characters:
What you have is an array of pointers to type char.
Anyway, you use the array (the real one, not the one you had), two ways:
Code:
struct foo
{
char name[SIZE];
} instance, *ptrtoinstance;
ptrtoinstance = &instance;
/* Directly... */
fgets( instance.name, SIZE, stdin ); /* read into name */
printf( "%s", instance.name ); /* display the name */
/* Via a pointer... */
fgets( ptrtoinstance->name, SIZE, stdin ); /* read into name */
printf( "%s", ptrtoinstance->name );
Just like you would normally.
[edit]
However, reading your problem description, you would want an array of pointers like you have. The syntax is virtually the same. However, remember, these are all pointers, so you'll need to malloc some space to read into. Assuming you've done that...
Code:
struct foo
{
char *namelist[SIZE];
} instance, *ptr;
ptr = &instance;
/* Directly... */
printf("%s", instance.namelist[NUMBER] );
/* Via a pointer... */
printf("%s", ptr->namelist[NUMBER] );
[/edit]
Like I said, virtually the same.
Quzah.