Replicating C++'s STL Vector Class