I've written a code for searching a specific file , where the user enters a starting path and a filename , and then the program prints its details if the file exists , or prints not found otherwise.
As I suspected , the using of recursion makes the code to crash when the hierarchy tree is too large ,I've tried with 400 directories and it failed ,so I guess that after something like 50
folders one inside to other ,the overhead of the recursion makes the code to crash .
Any suggestions how to fix that ? basically the code is okay for low level tree hierarchy , but I need to design it for healthy trees (500-600 folders one inside the other , and a file that is stored at the last folder) also , thanks