Relative Content

Tag Archive for c++memorydelete-operator

Problem with delete operator [] or memory allocation (?)

I’ve been working on a school project, it’s bascially a system simulating a library. My problem is that whenever one of the clients books a book, and then i try to delete him, i get an error A breakpoint instruction (__debugbreak() statement or a similar call) was executed. From what I have read it occurs when i try to read an array out of bounds or to delete something that already doesn’t exists, but even with that knowledge i have no idea how to fix this issue. My code is quite lenghty, so I will include the crucial parts:
my Client class