P
Perfect Reign
I am working with a class in which I am creating a 2d array with nine
elements. During the course of the class I set values to each of the nine
elements:
int intSquareOwner[][] = {{0, 0, 0}, {0, 0, 0,}, {0, 0, 0}};
At one point, I want to redim the array so that each element is set back to
a value of null or zero (doesn't really matter.)
Right now, I've written this:
for( int x=0; x<3; x++)
{
for( int y=0; y<3; y++)
{
intSquareOwner[x][y] = 0;
}
The above snippet works to reset all values to zero. Isn't there a way to
destroy or close an array then just reinitialize it?
--
kai - (e-mail address removed) - www.perfectreign.com
kai:/> format a:
Error: The DOS concept of formatting disk media is screwed.
To format a floppy, use "fdformat /dev/fd0"
and then "mkfs.minix /dev/fd0".
elements. During the course of the class I set values to each of the nine
elements:
int intSquareOwner[][] = {{0, 0, 0}, {0, 0, 0,}, {0, 0, 0}};
At one point, I want to redim the array so that each element is set back to
a value of null or zero (doesn't really matter.)
Right now, I've written this:
for( int x=0; x<3; x++)
{
for( int y=0; y<3; y++)
{
intSquareOwner[x][y] = 0;
}
The above snippet works to reset all values to zero. Isn't there a way to
destroy or close an array then just reinitialize it?
--
kai - (e-mail address removed) - www.perfectreign.com
kai:/> format a:
Error: The DOS concept of formatting disk media is screwed.
To format a floppy, use "fdformat /dev/fd0"
and then "mkfs.minix /dev/fd0".