I wanted to make a small "game" with a little bit of story, but I did some code and I think i did some major mistakes, here's the code
int main() {
char o, z, q, r;
string f, w = "yes", e = "no";
cout << "Hello, summoner!" << endl;
cin >> o;
cout << "You know why you are here, right?" << endl;
cin >> q;
switch ( z ) {
case 'w':
cout << "Ok";
break;
case 'e':
cout << "You are here to fight for your life!";
break;
}
return 0;
}
The second cin
, the cin >> q;
gets skipped every time I run the code and I don't know what to do.