toobe
May 20th, 1999, 04:43 AM
i wanna just initialize a array of BOOL data as following,
BOOL myArray[12][11];
In the constructor i initialise the array like this:
CMyDoc::CMyDoc()
{
...........
for (int y; y<11;++y)
{
for(int x; x<12; ++x)
{
myArray[x][y]=FALSE;
}
}
....................
}
It seems to have no problem. But when i started debugging, i have found that myArray[][]
was comically allocated with such values like "-847851241" or "577". But some elements
in the array was correctly allocated with "0".
Why ???
help me.....Thanx...
ur toobe
:-)
BOOL myArray[12][11];
In the constructor i initialise the array like this:
CMyDoc::CMyDoc()
{
...........
for (int y; y<11;++y)
{
for(int x; x<12; ++x)
{
myArray[x][y]=FALSE;
}
}
....................
}
It seems to have no problem. But when i started debugging, i have found that myArray[][]
was comically allocated with such values like "-847851241" or "577". But some elements
in the array was correctly allocated with "0".
Why ???
help me.....Thanx...
ur toobe
:-)