Alex Munoz wrote:I am writing code to solve a maze and the user is supposed to pick a file that contains the maze. I made sure that the file was in the same folder as the solver. The files are maze1.txt and maze2.txt and these are what print when the code runs instead of the mazes (Which are arrays) when Here is what I've written:
You code prints out the file object, which should print out the file name (and maybe some identity hashcode -- not sure of this part).
If you want the file contents printed, you will need to open the file, read it in, probably parse it (if you are using some special format), and then print it out based on the loaded maze data. The File object is just an object used to represent the file, it is not the file itself.
Henry