
char pointer to 2D char array
Hello, everyone!
Could someone please tell me if this declaration is OK:
char entry_string[4][255];
char *entry[4] =
{entry_string[0], entry_string[1], entry_string[2], entry_string[3]};
Splint warns me about this:
phoebe_gui_accessories.c:500:20: Initialized storage entry_string[0] not
completely defined (*(entry_string[0]) is undefined):
entry[0] = entry_string[0]
Storage derivable from a parameter, return value or global is not
need not be defined. (Use -compdef to inhibit warning)
And alike for the [1], [2] and [3]. Is it true that I cannot do it this
way? I use sprintf later to write to these pointers, e.g.
sprintf (entry[0], "String1");
etc.
Thanks for your time,
Andrej