I have a class Sprite; constructor: Sprite(); and I declear a Sprite array, ship--> private Sprite[] ship¡£and then how can i construct it? ship[0] =new Sprite();is passed when complie but failed when run.
I have a class Sprite; constructor: Sprite(); and I declear a Sprite array, ship--> private Sprite[] ship¡£and then how can i construct it? ship[0] =new Sprite();is passed when complie but failed when run.
Last edited by godener; 2003-12-23 at 09:09.
May-be obvious, but you did new the array as well, didn't you?
Something like:
Sprite[] ship = new Sprite[10];
thanks kersing! I get it from you!