Help with game

I need help with my while statement my stage1 function. When I enter 1 or 2 it still goes through the while loop.

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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
  #include <iostream>
#include <ctime>
#include <string>
#include <cstdlib>            

using namespace std;
//Declare struct

struct Character{
	string name;
	int age;
	string gender;
};

//Function prototypes
void intro();
void create(Character &);
void stage1(Character);
void ldoor();
void rdoor();



int main(){
	string x;

	Character hero;
	create(hero);

	getline(cin, x);

	stage1(hero);
	system("PAUSE");
	return 0;
}

void create(Character &b)
{
	string x;
	cout << "Now that you ready to begin your journey lets create your hero!" << endl;
	cout << "Please enter the name of your hero - " ;
	getline(cin, b.name);
	cout << endl; 
	cout << "Now how old is your hero? - ";
	cin >> b.age;
	cout << endl;
	if(b.age<21){
		cout << "Oh still a minor are we? Well no matter, your never to young to become a hero!" << endl;
	}

	else{
		cout << endl;
		cout << "Aren't you a bit to old to be a hero? hmmmm.....well no matter, lets go anyways!" << endl;
	}
}

void stage1(Character hero)
{
	int door;
	string x;
	cout << endl;
	cout << "To continue hit enter" << endl;
	getline(cin, x);

	cout << "So " << hero.name << " should we take the left or right door?" << endl << endl;
	cout << "!!!Remember all decisions may affect the games outcome!!!" << endl << endl;
	cout << "Enter 1 to go through the right and 2 for the left." << endl;
	cin >> door;                     

	while(door != 1 || door !=2)
	{
		cout << "ummm please enter 1 or 2, try again." << endl;
		cin >> door;

	}
	ldoor();

}

void ldoor()
{
	cout << endl;
	cout << "Look at the ceiling their is writing on the wall. " << endl;
	cout << "What does it say?" << endl;
}
It should be and(&&) not or (||).
Topic archived. No new replies allowed.