Sign-up code
May 26, 2016 at 7:30pm UTC
Hello everyone. This is login program, but all what's left is I have to create sign-up code - where for example I create text document where I all the sign up information and login is stored.
How do I create it?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
#include <iostream>
#include <string>
using namespace std;
int main(){
string username = "" ;
string password = "" ;
bool loginSuccess = false ;
cout << "\tWelcome! Pease login below.\n\n" ;
do {
cout << "Username: " ;
cin >> username;
cout << "Password: " ;
cin >> password;
if (username == "deez" && password == "nutz" ){
cout << "\nSuccessful Login\n\n" ;
loginSuccess = true ;
}
else {
cout << "Inccorrect username password combo \n" ;
cout << "Please try to login again.\n" ;
}
}while (!loginSuccess);
return 0;
}
May 27, 2016 at 12:08am UTC
Topic archived. No new replies allowed.