Login Interface- text basded

Here is some code i typed up for a text adventure i have named Pingers United. I am wondering what people think and how could it be improved?

heres the code below:

/* Pingers United Text Adventure Login Interface
BY Camryn Procter 28/04/2015 */
#include <iostream>
#include <string>
using namespace std;

int main()
{
string username;
string password;
cout << "Welcome to Pingers United Text Adventure.\n";
cout << "Enter Username: ";
cin >> username;
if (username == "DOAFtW");
{
cout << "Valid Username\n";
}

cout << "Enter Password: ";
cin >> password;
if (password == "desmond");
{
cout << "Access Granted!\n";

}


cout << "You are about to embark upon a perilous journey. There will be many unknown dangers out there seeking your blood.\n";
cout << "Just Make sure to get them before they get you.\n";
cout << "Now dive into your epic quest... Let's Go!!";
return 0;
}

Please leave a suggestive comment =)
Cheers
first please use code brackets:
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
#include <iostream>
#include <string>
using namespace std;

int main()
{
string username;
string password;
cout << "Welcome to Pingers United Text Adventure.\n";
cout << "Enter Username: ";
cin >> username;
if (username == "DOAFtW");
{
cout << "Valid Username\n";
}

cout << "Enter Password: ";
cin >> password;
if (password == "desmond");
{
cout << "Access Granted!\n";

}


cout << "You are about to embark upon a perilous journey. There will be many unknown dangers out there seeking your blood.\n";
cout << "Just Make sure to get them before they get you.\n";
cout << "Now dive into your epic quest... Let's Go!!";
cout<<endl<<endl;
return 0;
}
Last edited on
Create some Functions so its easier to read!

-add login loop

-clear screen after loop
Topic archived. No new replies allowed.