Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- #include <Windows.h>
- using namespace std;
- class UserBase{
- public:
- void GetUsername(string GetName){
- MyUserName = GetName;
- }
- void GetPassword(string GetPassword){
- GetPassword = MyPassword;
- }
- private:
- string MyUserName;
- string MyPassword;
- };
- int main(){
- UserBase Input;
- string MyName;
- string MyPassword;
- Input.GetUsername("test");
- Input.GetPassword("noob");
- cout << "enter your username, please." << endl;
- cin >> MyName;
- if (MyName == Input.GetUsername){
- cout << "enter your password.." << endl;
- cin >> MyPassword;
- if (MyPassword == Input.GetPassword){
- cout << "login was successfull" << endl;
- Sleep(5000);
- }
- }
- return 0; // if 0 then its a success
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement