+ 2
I need help, my code doesn't work
I'm pretty sure that there's something wrong at Board::Act() @line306~340, but I can't understand why. Can someone help me? By the way, it doesn't run well on sololearn, so you may have to run it somewhere else.đ„ https://code.sololearn.com/cfu2g59Xa50T
2 Answers
+ 1
@soman but no matter if I delete it or not, the result are the same
0
You create Board temp on the stack as automatic variable and you don't need to delete it manually, it's a mistake. The memory will be free automatically in that case. Delete only objects created with new operator
Just remove line 340