daily pastebin goal
66%
SHARE
TWEET

Untitled

a guest Jun 18th, 2017 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. bool validateUser(string theAccounts[5][7], string username, string password, int *saveRow)
  2. {
  3.     bool passed = false;
  4.     int user = 0;
  5.     int pass = 4;
  6.     int row = 0;
  7.    
  8.     // For loop passing through theAccounts array finding matching username + password.
  9.     // Returns false if no match is found.
  10.     for (int row = 0; row <= 4; row++)
  11.     {
  12.         if (username == theAccounts[row][user] && password == theAccounts[row][pass])
  13.         {
  14.             passed = true;
  15.             saveRow = row;
  16.         }
  17.     }
  18.  
  19.     return passed;
  20. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top