Do jagged arrays exist in C/C++?
c, c++, jagged-arrays
Solution
In C I would use an array of pointers.
For instance:
int *jagged[5];
jagged[0] = malloc(sizeof(int) * 10);
jagged[1] = malloc(sizeof(int) * 3);
etc etc.
Problem
Is there such a thing as a jagged array in C or C++? When I compile this: ``` int jagged[][] = { {0,1}, {1,2,3} }; ``` I get this error: error: declaration of `jagged' as multidimensional array must have bounds for all dimensions except the first