Array List object?

Gan via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Jan 26 21:32:08 PST 2015


Hey I'm using normal arrays for my project:
//Declaring the array
SBTile[] tiles;

//Initializing the array
tiles = new SBTile[](0);

//Clearing the array
tiles = [];

//Removing a tile at index i from the array
tiles.remove(i);

//Adding a tile to the array
tiles ~= tile;

But I think I'm doing something very wrong because my list of 
tiles is growing larger and larger. Am I misusing the array or is 
there a better way of doing those array list functions?


More information about the Digitalmars-d-learn mailing list