I'd like to create a render table function in C, probably the worst language to do it.
I have a little problem initializing a table with is a bidimensional array of string, that make it a tridimensional array of char.
I am not able to initialize a tridimensionnal array that way:
char *table[][] = {
{ "hello", "my", "friend" },
{ "hihi", "haha", "hoho"},
NULL
};
But I get the error
test_table.c:8:11: error: array type has incomplete element type ‘char *[]’
char *table[][] = {
Can C compiler compute the lengths of all the dimensions ?
I also have tried to declare it as table[][][] and all the possible variants with *....
char *table[][3], or perhapschar table[][3][7];.