Need help with basic login system :( (Using cmd)

Hello,
Here is my source: http://pastebin.com/6Ni4gFyS

It checks the userDB.dat file which holds the main admin account, the db holds:
Sam
abc123

If I input that, I can login. Then it will ask me to add new users to the database. (In this case I want to create individual user files. Tom.dat, Danny.dat etc)

So that's all working.
But what would be the best way to allow you to login with the new user files that were created? Thanks

I guess you could first check the username then make a string filename with .dat in the end. Then open the file.
1
2
3
cin >> user;
string format = ".dat";
string filename = user + format;
Topic archived. No new replies allowed.