[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [pbmserv-dev] Q: array of integers
On Wed, Dec 31, 2003 at 01:08:30PM -0600, Douglas Zander wrote:
> May I keep a two dimensional array of integers in the board files?
> How would I do that? Any games with examples?
> I am thinking of using the ReadWriteIntList class, only use it
> for a two or three dimensional array.
> Any help would be appreciated. TIA
You can construct a 2d array from a 1d array... say you want a
6x8 matrix. that's 48 elements.
build a 48 element ReadWriteintList
then access it as array(x,y) ==> array(8*x + y)
--
/ \__ | Richard Rognlie / Sultan of Sendmail / Gamerz.NET Lackey
\__/ \ | http://www.gamerz.net/rrognlie/ <rrognlie at gamerz.net>
/ \__/ |
\__/ | CAUTION: may contain Mature material......but I doubt it.