Advertisement
Guest User

keszi

a guest
Mar 16th, 2016
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.51 KB | None | 0 0
  1. File file = SD.open("user.dat");
  2. if (file) {
  3.     string user;
  4.     string password;
  5.     while (string line = file.ReadLine()) {
  6.         foreach (line as s) {
  7.             while (s != "@") {
  8.                 user += s;
  9.             }
  10.         }
  11.         if (user == __USER_INPUT_VARIABLE__) {
  12.             int i = 0;
  13.             for (; i<=line.length(); i++) {
  14.                 if (line[i] == "@") {
  15.                     break;
  16.                 }
  17.             }
  18.             for (; i<=line.length(); i++) {
  19.                 password += line[i];
  20.             }
  21.             break;
  22.         }
  23.     }
  24.     file.close();
  25.  
  26.     if (password == __USER_INPUT_VARIABLE__) {
  27.         doLoginProc();
  28.     }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement