Hi. I have written a simple password system which lets a supervisor input 10 passwords, and then a user can attempt to log on. The password is checked for length (via strlen). It is checked for<255 chars initially and then to ensure it is 6 chars long. Strcmp and return val then check for a match when a user attempts an input. I have also included a 3 guess system which terminates the program if the user fails to log on within 3 tries.
Finally i need to ensure the supervisors and users passwords are inputted in the format of two letters and four numbers.
Any ideas on the best (or only) way to do this? Currently I am using two dimensional arrays for the Password variable.
A few ideas i.e ascii code checks or whatever would be appreciated.