Advertisement
Nkzlxs

compareEmployee String Function

Mar 31st, 2020
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.42 KB | None | 0 0
  1. bool compareEmployee(string a)
  2. {
  3.     cout << "Debug: Received: " << a << endl;
  4.     for (int u = 0; u < THE_ARRAY_SIZE; u++)
  5.     {
  6.         //cout << STR1[u];
  7.         //if inputted string is found in the array a.k.a database
  8.         if (a.compare(STR1[u]) == 0)
  9.         {
  10.             performDeletion(u);
  11.             return true;
  12.         }
  13.     }
  14.     cout << "Error: No such employee!" << endl;
  15.     return false;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement