Class DynamicArray
{
public:
DynamicArray(int size);
~DynamicArray();
private:
char *A;
int N;
};
DynamicArray:
ynamicArray(int size)
{
N=size;
A=new int[N];
}
DynamicArray::~DynamicArray()
{
delete A;
}
I havn't compiled this or anything so there may be a few typos but you should get the basic idea.
Then just add what ever functionality you want.