Hi there, I am trying to make a program where a random maze is generated however, the program crashes most of the time. I tried to solve this without using struct and without creating a 2D array dynamically and it worked fine then. But after doing it in this way the program doesnt work. I think there is something wrong in the SolveMaze() function but i cant figure out what it is :(
and now it works. The problem was that the program kept crashing every time row==0 happened, and I guess you are right, for some reason it didnt check the row < ROW && row > 0 part maybe because it was at the very end of the if statement. But now it is running fine.