you should learn how to use the standard template library vectors, lists and maps. Maps are the only tricky ones to use. The main difference is that they can change size at run-time whereas arrays can't.
e.g. a vector of ints:
code:
#include <vector>
vector<int> stats;
\\adding stuff:
stats.push_back(5);
\\then you can go through it by creating an iterator:
vector<int>::iterator it
\\and loop through:
for(it=stats.begin(); it != stats.end(); it++)
{
int i = *it;
} [/QUOTE]can't remember other operations but I think you can erase like:
stats.erase(it); where it is the iterator pointing to a position in the vector
[ 06-08-2006, 10:20 AM: Message edited by: Vaskez ]
__________________
Too set in his ways to ever relate
If he could set that aside, there'd be heaven to pay
But weathered and aged, time swept him to grave
Love conquers all? Damn, I'd say that area's gray
|