Hello, I am trying to figure out why my code is not working. It is a simple login and signup program. My problem is that the "while" function on Line: 66 does not work and gives me an error when I run it. There are 2 .txt files which store the usernames and passwords. The program is compiling successfully but the crashes when I try to log in.
First, you're not checking all possibilites (ex.: what if signup was SiGnUP?).
Second, you're using goto when you could only use while.
Third, you're not checking "login". The goto goes directly to b label, after the if. So you made 52-62 for nothing: your code will never reach them. Fourth, using while with a stream (casting it to a bool) says if it is good for reading/manipulation. That's probably your error.
Fifth: you're using C libraries when you could only use C++ libraries. That's an awful practice.