hi:
I have a source code below,I can compile it with no error,but when I run it ,a error jump out call:"debug assertion failed".I don't know where the wrong occurs.
Off the top of my head, the default copy constructor is doing a shallow copy of the buffer pointer. So the destructor of a and b are both trying to delete the same memory.
Option 1) Comment out line 59.
Option 2) Comment out line 53.
Option 3) Implement an appropriate copy constructor.