I didn't read through all of your code, so I don't know if this will work for you, but have you looked into vectors? They'll handle any data type and can increase/decrease to suit you. They also can be accessed as arrays. They're part of the STL, so you should be able to find lots of info on them. They're real easy to use. They work like a stack.
vector v; // the part in brackets could be any data typev.push_back(1);v.push_back(2);v.push_back(3);for (int i=0; i<v.size(); i++){ cout << v << endl;}v.pop_back(); // removes last element (3)
They have a bunch of other method's also to manipulate them. Well, I hope that will work for you.
- David
[edited by - BitBlt on June 24, 2002 2:34:59 PM]