+ 3

Please help me with this c++ problem.

I am making a game where I want to user to write "next" for the code to keep on going.

1st Jun 2018, 4:32 PM
Bendik Lien
Bendik Lien - avatar
3 Antworten
+ 2
#include <iostream> using namespace std; int main() { string name; cout << "Choose a name for this adventure\n"; cout << "What do you choose?\n\n"; cin >> name; cout << "Wake up " << name << ". You have to get ready for your great adventure!\n\n"; // This is where i want to make it so i have to enter next for the code to continue char gender; cout << "Are you a boy or a girl? (b/g)\n\n"; cin >> gender; if (gender == 'b') { cout << "I am also a boy! Nice to meet you."; } else { cout << "I am also a girl! Nice to meet you."; } return 0; }
1st Jun 2018, 4:32 PM
Bendik Lien
Bendik Lien - avatar
1st Jun 2018, 4:50 PM
‎ ‏‏‎Anonymous Guy
0
Thank you very much Sreejith
1st Jun 2018, 4:58 PM
Bendik Lien
Bendik Lien - avatar