Please explain this declaration in details
it makes confusing!
Have you tried to compile and run it? Add the following statement and see what
the output is:
-
// assuming C++
-
for (int i= 0; i < 5; i++)
-
cout << i << ": " << dic[i] << endl;
I'm sure this is not what you wanted. Hint: remove the '*' in your definition of 'dic'.
You have declared an array with an unknown number of rows (the initializer will
determine how many rows are needed. Every row contains 40 pointers to chars
of which you initialize only five. The iniitializer tells the compiler that only one
row is needed.
kind regards,
Jos