Discussion Board

Results 1 to 3 of 3
  1. #1
    Regular Contributor godener's Avatar
    Join Date
    Nov 2003
    Location
    Fuzhou china
    Posts
    131
    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.

  2. #2
    Registered User kersing's Avatar
    Join Date
    Mar 2003
    Location
    Netherlands
    Posts
    18
    May-be obvious, but you did new the array as well, didn't you?

    Something like:
    Sprite[] ship = new Sprite[10];

  3. #3
    Regular Contributor godener's Avatar
    Join Date
    Nov 2003
    Location
    Fuzhou china
    Posts
    131
    thanks kersing! I get it from you!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved