void resize(unsignedint amount)
{
T* tmp = new T[amount]; // Allocate a pointer that holds the value
std::copy(std::begin(value), std::end(value),std::begin(tmp));
delete[] value; // Delete the class pointer
value = tmp;
cap = amount; // Update
}
You're acting like 3 years of programming experience is worth writing home about.
Write home? He is 12, he just has to go to the other room and say "Hey, mom, I've been programming for 3 years. That is 1096 day, a whole day short of 1097!"
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>?
When I was twelve I played games. 1993 was also the year I started looking into how to make games, but it would be 3 more years before I ever found out there were books to teach you how to program.
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...)