3 ms·
> VLA typedef ... I have no clue how this could ever be useful. I used this feature recently. I had several arrays of the same size and type, and the size was
by deckar01 7y ago
> VLA typedef ... I have no clue how this could ever be useful.
I used this feature recently. I had several arrays of the same size and type, and the size was determined at runtime. The VLA typedef let me avoid duplicate type signatures which I find more readable.
int N = atoi(argv[1]);
typedef int grid[N][N];
grid board;
grid best;
grid cache;