0

Hi, i have a problem with the declaration of a bidimensional array

I HAVE TO COMPILE WITH -STD=C89 -PEDANTIC I WROTE: int A[base][altezza] AND THE WARNING IS: ISO C90 FORBIDS VARIABLE LENGTH ARRAY ‘A’[-Wvla]

11th Jan 2020, 9:05 AM
Sofia Amaolo
Sofia Amaolo - avatar
1 Antwort
0
VLAs (https://en.wikipedia.org/wiki/Variable-length_array, https://gcc.gnu.org/onlinedocs/gcc/Variable-Length.html) are supported in C99 on. The following illustrates VLAs in C99 https://code.sololearn.com/cTpo4AMl8HNj/#cpp For arrays of arrays in C do it on the heap with malloc https://code.sololearn.com/cNzrSfw7uLt9/#c
10th Aug 2020, 2:21 PM
Ockert van Schalkwyk
Ockert van Schalkwyk - avatar