Hi,
This is driving me mad. I've created a simple class:
class MYCLASS
{
int x, y;
int Alive;
}
And create some instances of it with:
MYCLASS[] Bullets = new MYCLASS[10];
This is all fine. But when I come to use it, I get an application error on runtime. For example the following code causes the problem.
for( x = 0; x < 10; x++ )
{
Bullets[x].x = 0;
Bullets[x].y = 0;
Bullets[x].Alive = 0;
}
I really cant see why this causing an application error as I have one other more complex class working. I can also replace this particular class with a simple int array and it works fine, so there is something about the way I'm doing classes I guess. I'm not out of heap, as the new works as is. It's just reading or writing to the class instances that cause the problem.
Any ideas?
Thanks in advance.

Reply With Quote


