title: how to separate login for admin and user? c++
body: <p>How to compare the username and password entered by user with the data(username and password saved in before) in the admin array and customer array,</p>
  
  <p>so for example when it match the username and password in the admin array, it will directs the user to the admin_mainmenu(), otherwise it directs to the customer_mainmenu().</p>
  
  <p>help please..</p>
  
  <pre><code>char username_admin[10];
  char password_admin[10];
  
  string username_customer[50];
  string password_customer[50];
  
  
  int main(){
  fstream login("password.txt", ios_base::out | ios_base::in);  // will not create file
  if (login.is_open())
  {
      cout &lt;&lt; "Database exists." &lt;&lt; endl;
      admin_signin();
  }
  else
  {
      cout &lt;&lt; "Database Do not exits. Be an adminstrator. Sign Up";
      admin_signup();
      login.clear();
      login.open("password.txt", ios_base::out);  // will create if necessary
  }
  
      admin/customer_mainmenu();
  
  
      system("pause");
  return 0;
  }
  </code></pre>