>I seem to remember something about Prelude saying for 2 dimensional arrays you need to use something else along with the
It depends on what you want to initialize the array with. If all you want is an array with the equivalent of 0 in every element then
Code:
T array[size] = {0};
Is what you want. On the other hand, if you want any other type of value you need to specify them exactly:
Code:
T array[size] = {0,1,2,3,4,5};
Any unspecified values will be given T's equivalent of 0.
For multidimensional arrays, it helps to format the list with redundant braces to help with readability:
Code:
T array[2][size] = {
{0,1,2,3,4,5},
{5,4,3,2,1,0}
};
It gets even more important as you add more dimensions.