I am quite lost right now. I made a vector class. Everything works how I would like it to work, until the end. When the destructor is called I get an error message: Debug ass
The error means heap corruption. There are lots of ways to corrupt a heap. Like David explained above, freeing a chunk of memory and then writing to it is one way.
Most heaps store some bytes of bookkeeping information before and after your chunk of memory. If your code misbehaves and changes the heaps data, you get this type of error.