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

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -