When I try to load the same code a second time in the terminal, it shows the following error.
My understanding is that if you create a variable using “new”, the memory is stored in a heap so you have to use delete command to free the space. However, I have defined the variable normally so it should be stored in stack memory and should be freed after the program ends.
How can I execute my code without getting the following error? Thank you.