Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdafx.h"
- #include <stdio.h>
- #include <stdlib.h>
- #include <iostream>
- #include <string>
- using namespace std;
- int main()
- {
- string s_userName = "demo";
- string s_userPass = "demo";
- string s_tempName, s_tempPass;
- cout << "Test Project #2: Login" << endl;
- cout << "Enter Username: ";
- cin >> s_tempName;
- cout << "Enter Password: ";
- cin >> s_tempPass;
- if( s_userName == s_tempName && s_userPass == s_tempPass )
- {
- cout << "Successfully Logged In!" << endl;
- }
- else
- {
- cout << "Invalid Username/Password!" << endl;
- }
- // Bad form, but sue me.
- system("PAUSE");
- return 1;
- }
Add Comment
Please, Sign In to add comment