Well, i'm making my first rpg text game.
I'm getting a problem. While it's asking my name in the program, it closes.
Code:#include <iostream> #include <string> #include <windows.h> #include <time.h> using namespace std; int main (void) { int name; int nation; cout << " Version 0.0.1 " << endl; cin.get(); cout << "What's your name? \n\n\n"<<endl; cin.get(); cin >> name; cin.get(); cout <<"Which nation will you choose\n\n\n\n"<<endl; cin.get(); cout <<" 1 = Orc "<<endl; cout <<" 2 = Human "<<endl; cin.get(); switch (nation){ case 1: cout << " So you're an orc.. "<<endl; cin.get(); case 2: cout << " So you're a Human.. "<<endl; cin.get(); } cin.get(); return 0; }



LinkBack URL
About LinkBacks


