Dynamic array of an object -
maybe solution simple. must be, maybe overlooking something
i have:
public class object { public int pos_x; public int pos_y; } object testobject[] = new object[10] and somewhere in function
testobject[1].pos_x = 1; it force closes app.. how? , why? can cause of this.
furthermore. ideally need this
testobject[].add_new_object(); testobject[].remove_item(3); can done?
thank helping
you have allocated array can hold 10 objects.
you need allocate objects.
Comments
Post a Comment