0

Does this code cause a memory leak?

This is from the challenge given at the end of the object oriented programming lesson. I modified it to "resize" the array every time an element is added. I'm not sure how I would check if it is causing a memory leak. I wrote this on the Sololearn app, but I usually use visual studio. https://code.sololearn.com/co6idzJy597x/?ref=app

20th Jun 2021, 1:27 PM
83338
2 Réponses
+ 2
just add a cout in the destructor and see if it prints it
20th Jun 2021, 2:08 PM
Bot
Bot - avatar
+ 1
Martin Taylor thanks. Would learning C teach me more about <cstdlib>?
20th Jun 2021, 8:52 PM
83338