I\'m trying to write a program that solves a specific inputted maze recursively and outputs it\'s position in the maze after each move.
Whenever I try and run my code,
There maybe a good reason behind this but I'm not sure why you ignore your const int of 16 as max Width and make it 17 instead. Might not solve the problem but that sure looks wrong to me.
Also like a commenter said why initialise X and Y inside main's brackets? Why not just do it inside main. Or as the other poster said, turn that main function into a separate function then call it in a fresh main.
When main
is first called the runtime environment passes it arguments, so your default arguments aren't used. Rename the function and call it from main
.