We are trying to open UserPass.txt file which seems to be missing from the project. ifs.open("UserPass.txt");