void resize(unsignedint amount)
T* tmp = new T[amount]; // Allocate a pointer that holds the value
delete value; // Delete the class pointer
value = tmp;
cap = amount; // Update
When I was twelve, I watched Pokemon, Digimon, and Yu-Gi-Oh all day long.
If you're writing a container similar to vector/dynarray, why not try writing a specialization of YourVector<T*>? Or try writing a dynamic bitset container that's like a combination of vector<bool> and bitset<N>?
Also, I did my math wrong, this was 11 years ago :$. I had just come across the concept of programming and I had BEGGED my step-father for a new computer or something that let me do more than... turn the computer on (since it couldn't handle flash and most web pages... or much of anything else to be honest...)