Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- using namespace std;
- int main()
- {
- void WaitForEnter();
- int mapIndex;
- string mapName[4] = {"Capitol", "District 1", "District 11", "District 12"};
- string mapDescription[4] = {"Where the hunger games are held every year. It is the capitol \
- city of Panem. The capitol is a wealthy urban city supported by its sourrounding impovershed \
- twelve districts." , "District 1 produces luxury items for the capital. They are known for\
- producing 'Careers', children who are chosen to train specifically for the hunger games.", \
- "District 11 produces agriculture products, the girl Rue, a 12 year old tribute is from \
- District 11. Rue is frail, but wily as she can manuevar easily in the trees.\
- Rue teams up with Katniss during the hunger games until she is killed \
- by District 1's Marvel.", "District 12 produces coal, Katniss Everdeen and Peeta Mallark \
- are the two hunger games tributes from District 12."};
- cout << "Hunger Games regions" <<endl
- << "0 - Capitol" << endl
- << "1 - District 1" << endl
- << "2 - District 11" << endl
- << "3 - District 12" << endl
- << "Please enter the index of the map you would like to see a description of: ";
- cin >> mapIndex;
- while(mapIndex <0 || mapIndex >3)
- {
- cin.clear();
- cin.ignore();
- cout << "Please enter a number between 0 and 3: ";
- cin >> mapIndex;
- }
- cout << endl << mapDescription[mapIndex] <<endl;
- cin.ignore();
- cout << "Please press enter to exit...";
- WaitForEnter();
- }
- void WaitForEnter()
- {
- while ( 1 ) { if ( '\n' == getchar() ) { break; } }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement