I need some help with my atm program. I don't remember how to inFile. I need to use that so that the users who log in are saved onto the program for future use. The program opens but when I select an option, it gives me an error saying "value2" is being used without being initialized. If there are anymore errors, could you please point them out.
At line 35, you declare value2 without initialising it.
At line 52, you pass it into deposit while it's still uninitialised.
I don't understand why you're passing 2 arguments into deposit and withdraw. Each of those functions only uses one of the arguments that are passed into it.
1) Think about why you're passing 2 arguments into deposit and withdraw.
Does deposit need to take num2 as an argument? If so, what should it be doing with that argument?
Does withdraw need to take num1 as an argument? If so, what should it be doing with that argument?
Once you've figured that out, adjust the function definitions accordingly.
2) Always make sure your variables have values assigned to them before attempting to use the values in them. Otherwise, you'll wind up with random values in those variables.
I know maybe I sound desperate here but could you tell me how I should fix it? It is due tomorrow and I'm so screwed if I don't get this done by then. I know it's a better thing for me to do on my own but I'm already out of time, unfortunately...
All I need to make this program do is save the users balance when he/she withdraws or deposits. And able to create new users with passwords and usernames.