Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma once
- #include "Includes.h"
- class Login
- {
- protected:
- string Username = "raz", Password = "jonasfild1";
- private:
- string ChUsername, ChPassword;
- bool ValCheck()
- {
- cout << " Username: ";
- cin >> ChUsername;
- system("cls");
- cout << " Password: ";
- cin >> ChPassword;
- system("cls");
- if (ChUsername != Username || ChPassword != Password)
- {
- return false;
- }
- else
- {
- return true;
- }
- }
- public:
- void Check()
- {
- if (ValCheck())
- {
- cout << " Welcome " << ChUsername << "!\n";
- Sleep(2000);
- }
- else
- {
- cout << " Wrong Username / Password! \n";
- Sleep(2000);
- exit(1);
- }
- }
- } Login;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement