Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bool validateUser(string theAccounts[5][7], string username, string password, int &saveRow)
- {
- bool passed = false;
- int user = 0;
- int pass = 4;
- int row = 0;
- // For loop passing through theAccounts array finding matching username + password.
- // Returns false if no match is found.
- for (int row = 0; row <= 4; row++)
- {
- if (username == theAccounts[row][user] && password == theAccounts[row][pass])
- {
- passed = true;
- saveRow = row;
- }
- }
- return passed;
- }
Add Comment
Please, Sign In to add comment