You could do something like the following:
</font><blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">#include <vector>
class MyClass {
public:
MyClass (int arraySize)
{ _array.reserve(arraySize); };
protected:
vector<int> _array;
};</pre><hr /></blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">To add an item to the back of the array, use _array.push_back(someInt). To get the number of elements, use _array.size(). Access the elements of your array using _array[someIndex].
Does this do the trick?
<small>[ 07-27-2002, 02:41 PM: Message edited by: smeger ]</small>