Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
I have an assignment that I need to create a system where users log in and vote on some issue.
I have to use 2 dat files, one storing the number of votes for each option and the other storing the user names and passwords.
So far I've managed to do the first one, because it will only ever have one record which is overwritten each time, but I'm having trouble creating the file of usernames.
New names have to be created by the master user. When they press the 'OK' button, I want it to add the new username and password (from edit boxes) to the end of the dat file. At the moment it's overwriting the first record each time. I've tried 'Append' but it comes up with an error (incompatible types). Can someone give me any pointers please?
Also, when I opened the file in Notepad I can only see the username, not the password. Is this normal? (We were only taught using .txt files and I don't remember any being invisible).
0 · ·