What could i add to this program

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
#include <iostream>
#include <string>

using namespace std;

int main() {
    string password = "billy";
    string username = "billyeastep9";
    string userinput;

    do {
        cout << "Enter username... " << endl;
        cin >> userinput;
        if (userinput == username) {
            cout << "Enter password... " << endl;
            cin >> password;
        }
    } while (userinput != username);

    if (password == "billy")
        cout << "Welcome!" << endl;
    else
        cout << "Access denied, try again" << endl;

    return 0;
}


What can i add to compliment this program?
Last edited on
Store usernames and passwords in a file that the program reads from, to allow multiple users.
How would i go about beginning to do that?
This way - http://bfy.tw/3gnD

Also works with youtube.
Topic archived. No new replies allowed.