Here is what I'm doing.
I have a class which I instance and it has a std::vector.
when I first instance the class this std::vector is empty.
The way I use it is I exponentially add to it and clear. Ex:
Add a number, clear the vector:
Add 2 numbers, clear the vector:
Add 3 numbers, clear the vector,
Add 4 numbers, clear the vector. ......
Is a std::vector the bst way to do what I'm doing? I tried to do reserve(100,000) in the constructor but this did not help.
Is there maybe a better container for my usage?
Thanks