I'm working on a vector-type class, but I'm having trouble with my remove function.
I'm using std::allocator to allocate memory for my vector, and I'm trying to use the destroy member to delete an element like this:
but if i try this on a vector that contains the ints 1, 2, 3, 4Code:void destroy_test(iterator todelete){ allocated_memory.destroy(todelete); }
it still prints out 1, 2, 3, 4?Code:vec.destroy_test(vec.begin());