We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi, why do I get this c163, if I try to compile following sequence? Shouldn't be a problem for a c-compiler to determine the array-size. code const char code *EinstellMenue[][] = {{ " Einstellungen ", " (up/dn/esc) ", " F1 Messstellen ", " F2 Kalibrierung ", " F3 Verschiedenes ", " F4 Statistik " },{ " Settings ", " (up/dn/esc) ", "F1 Measuring points ", "F2 Calibration ", "F3 Miscellaneous ", "F4 Statistic " }}; Regards Eckhard
In your array declaration:
code const char code *EinstellMenue[][]
char array [] = { 1,2,3,4 };
char array [][4] = { 1,2,3,4,5,6,7,8 };
char array [][] = { 1,2,3,4,5,6 };
char array [][] = {{1,2},{3,4},{5,6}};
Since C166 is supposed to be an ANSI C compiler, I tried to verify that the 'common sense' approach does not deviate from the standard. I have the ISO C 1999 standard, but I don't think it differs from ANSI C in this matter. It says: The element type shall not be an incomplete or function type. An array with unspecified size is an incomplete type. Since a two-dimensional array is an array of arrays, it should mean that one of the two indices in a two-dimensional array declarator must be specified. Now which one can be omitted: the one on the left or the one on the right? According to common sense, the one on the left. Funny, I could not derive that from the text of the standard. Regards, - Mike