Hi,
I'm cracking my head open on how to use the Array<T> template. All I want is for one of my classes to have an array of objects as a member variable. Then I want to delete the entire array of objects and start over.
How can I do something like this:
Array<int> ia(5);
ia.Clear();
ia.NewSize(20);
ia.Clear();
ia.NewSize(15);
?
Should I do this instead?
Array<int> *ia = Array<int>(5);
ia = &Array<int>(5);
delete ia;
ia = new Array<int>(10);
But then I can't do ia[index] and as far as I can tell there's no ia->Member(index) method.
I'm trying to boil this down to a simple example but it's hard. The essence is that I need an array of objects that I can either resize or destroy and rebuild at will. The array is a member of a class.
The documentation isn't all that helpful
### TODO: Write a detailed description for Array.