Perhaps your input file is in the wrong location. It needs to be in the current working directory, which can be different depending on how you're running the program. If you're running the program from inside an IDE then the input should probably be in the same directory as the project files. If you're running the program from the command line then the input file needs to be in the directory from which you're running the program.
I am running the program from the command line and the input file is in the same directory from which I am running the program. I also have the input file as part of my project resource files. I am still not able to open my input file and my program simply terminates.
Those are commands to list the directory contents. If you're running Windows you'll type "dir" then press enter and you should see a directory listing.