+ 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.
3 Answers
+ 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;
}
+ 2
check this for reference
https://www.sololearn.com/Discuss/1318946/?ref=app
0
Thank you very much Sreejith