I would like to implement into my code, something where a user can login, and based on a stored value with the users name and password, would only allow the user to use certain features of the program.
for instance...
User: 7588; Pass: 2011; Access Lvl: 1; and with lvl 1, the program would allow it to use all features because 1 would designate an admin.
Another....
User: 9215; Pass: 2012; Access Lvl: 4; with lvl 4, the user would only be allowed to use certain functions as the program would think its a certain kind of user.
The users and passes are both only 4 digits. No alphabetical characters. Simple.
I guess my REAL question is Where can I go to learn how about how to OR What do I have to do to: (prefer where to go to learn, what good is someone telling me how to do):
1. Create a simple flat text file (CSV) database where it will search for username, compare to stored password, and go to section of program where only the allowed features are available for use.
2. Create a seperate section of the program on which can be excecuted for certain lvls.
A) Should I use if...then statements to display options based on access
B) Is there something out there I have not learned that would be easier & make it hard for person to use a feature by memorizing option #.
3. Is this even possible with C++ alone? If not, what language would be better suited for this? I WOULD PREFER to stay soley on C++ and not use other software. Prefer to be self contained.
I'm a begginer and I have read tutorials on here, and on other sites, and I have not found what I needed.
More detailed information will be providid on request, please be specific.
Maybe it is not a good idea to store the password in plain text.
Instead of if..else to distinguish the levels, you could make an hierarchy and use polymorphism.
I don't understand the point 2_B, what do you mean by "memorizing option #" ?