I need help, my code doesn't work | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 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

7th Jul 2017, 1:37 PM
Flandre Scarlet
Flandre Scarlet - avatar
2 Answers
+ 1
@soman but no matter if I delete it or not, the result are the same
7th Jul 2017, 2:30 PM
Flandre Scarlet
Flandre Scarlet - avatar
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
7th Jul 2017, 2:18 PM
soman