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,
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().
if (login.is_open())
{
cout << "Database exists." << endl;
if (!admin_signin()) // couldn't login with admin credentials
customer_mainmenu()
}
else
{
cout << "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_mainmenu();