Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Example program
- #include <iostream>
- #include <string>
- using namespace std;
- class SystemOne{
- private:
- string userid;
- string password;
- public:
- SystemOne(){
- cout<<"================================\n";
- cout<<"==============LOGIN=============\n";
- cout<<"================================\n";
- cout<<"==========ENTER USERID=========\n";
- getline(cin, userid);
- cout<<"=========ENTER PASSWORD========\n";
- getline(cin, password);
- //userid must be 'admin' and password must be 'admin'
- if( userid == "admin" && password == "admin" ){
- cout<<"======================WELCOME!===================\n";
- } else {
- cout<<"LOGIN ERROR!\n";
- }
- }
- };
- int main()
- {
- SystemOne s;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement