#include <iostream>
using namespace std;
int main()
{
system("color 0A");
cout <<"\tWelcome to Krinick...\n";
char userName[100];
cout <<"\nWhat is your name?: ";
cin >>userName;
cout <<"Very well, "<<userName<<"\n\n";
cout <<"Where were you born? (1, 2, 3): \n";
cout <<"1 - Carngean Empire (Human)\n";
cout <<"2 - Fraulian Hold (Orc)\n";
cout <<"3 - Delvian Darkwoods (Elf)\n";
int pickRace;
cout <<"...";
cin >>pickRace;
switch (pickRace)
{
case 1:
cout <<"What is a Carngick doing in Krinick? None-the-less I grant you access\n";
cout <<"through the gates of our world.../n";
break;
case 2:
cout <<"Ahh, an Orc. Do you fancy a blacksmith?\n";
break;
case 3:
cout <<"Your a long way from your friendly darkwoods, Elf.\n";
cout <<"Fortunately we have woods here in Krinick...\n";
break;
default:
cout <<"Error - Invalid input; only 1 or 2 allowed.\n";
}
int Gender;
cout <<"\nWhat gender are you, if you do not mind my asking?\n";
cout <<"1 - Male\n";
cout <<"2 - Female\n";
cout <<"...";
cin >>Gender;
switch (Gender)
{
case 1:
cout <<"You are a male.\n\n";
break;
case 2:
cout <<"You are a female.\n\n";
break;
default:
cout <<"Error - Invalid input; only 1,2 or 3 allowed.\n";
}
{
char Answer[100];
cout <<"Let me stamp you papers. But before I do, What weopon do you use for\n";
cout <<"killing your enimies?\n";
cin >>Answer;
cout <<""<<Answer <<"?\n\n";
cout <<"Interesting...\n";
cout <<"I seem to have a(n)"<<Answer<<" in my possession.\n";
cout <<"Here, as a gift.\n";
cout <<"Got "<< Answer<<"\n";
cout <<"The gates open and the world of Krinick expands in front of you.\n";
cout <<"You set off to the main city Cryzean " <<Answer<<" in hand.\n";
}
system("pause");
}
I want to know if it is possible to change case 1, 2etc... to letter or even word choices? Example: Zork, Dungeon choises...
Also, how do you tell your program to remember cin codes throughout the program, such as a name or item?

New Topic/Question
Reply



MultiQuote








|