Page 1 of 1

PostPosted: Thu Apr 26, 2001 9:18 pm
by brendan
does anyone know how I can get a multi-dimentional arrays working, easyly in v3. I've tried the following, and failed ???, any ideas, I really, really need to use mda's, whys does int frd[5][5], not work ?, surly mda's should have be implemented by now, they are fundemental to programming:

struct screenx
{
int x[30];
};

screenx y[30];

main()
{
int z
z = y[5].x[5];
text(50,50,z);
}

-thanks all.

PostPosted: Thu Apr 26, 2001 10:33 pm
by wolfgang
Hello,

I have a complete&tested implementation (source code!) for multi-dimensional arrays on my webpage:

http://pages.prodigy.net/gwen.and.wolfgang

Go to the "Resources" section. The source code also contains a manual on its usage. Declaring the arrays is a little different than "normal" C, but using them works just the same (or even better, because you can just pass the base pointer to a function and not at all worry about the dimensions).

Wolfgang