a guest Jun 18th, 2017 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- bool validateUser(string theAccounts, 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;
RAW Paste Data