Slapshot136
Divide et impera
- Reaction score
- 471
I want to create a multi-dimension array of a struct and initialize it to a certain value, but I can't seem to find the right syntax..
how would I do this?
Code:
struct test
{
int store;
void test(int i = 0, int j = 0)
{
store = i + j;
}
}
Code:
test[ , ] arr =
{
{ new test(1,2)} { new test(2,3)},
{ new test(4,5)} { new test(9,1)}
};
how would I do this?