main calls SeekRoad
SeekRoad calls SeekRoad
Second SeekRoad returns -1 --> No exit!!
But what will return the first SeekRoad to the main?
It ignores the value return by the subsequent call to SeekRoad and returns 1
Road found - but where to?
main calls SeekRoad
SeekRoad calls SeekRoad
Second SeekRoad returns -1 --> No exit!!
But what will return the first SeekRoad to the main?
It ignores the value return by the subsequent call to SeekRoad and returns 1
Road found - but where to?
so what does that mean?
You should not ignore the return value of your function
I mean like this
You always return 1 independently of the return value of the seekRoadCode:seekRoad(maze, x, y); return 1;