can anyone show me an example on how to do this
can anyone show me an example on how to do this
struct SomeStruct // example of a struct...
{
int SomeInt;
};
int Array2D[20][3]; // example of a 2d array
or, if you want a 2D array inside a struct you'd go:
and in main()PHP Code:
struct 2DArray
{
int Array[2][2];
};
something like thatPHP Code:
2DArray Structure;
Structure.Array[0][0] = '1';
Structure.Array[0][1] = '2';
Structure.Array[1][1] = '3';
Structure.Array[1][0] = '4';
And of course a 2d array of a struct:
Code:struct Thing { int ThingInt; long ThingLong; } Thing myThing[2][2]; myThing[0][0].ThingInt=2; myThing[0][0].ThingLong=65535; myThing[0][1].ThingInt=4; myThing[0][1].ThingLong=64333; myThing[1][0].ThingInt=3; myThing[1][0].ThingLong=34543; myThing[1][1].ThingInt=6; myThing[1][1].ThingLong=23456;