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
Your copy assignment operator is broken. After that operator, both instances have the same value for _myArray. So as soon as one is destructed, the other one is left with a pointer to something that no longer exists.