#include <iostream>
using namespace std;
int main()
{
char w
;cout << "Welcome to the forest adventure game.\n";
;cout << "You can bring one object.\n";
;cout << " what object do you choose enter(f) for food (m) for map and (s) for sleeping bag.\n";
;cin >> w;
;cout << "You hear a sound do you go towards it enter (y) or (n)";//y means yes n means no
char t
;cin >> t;
if(t=y){
;cout << "The sound gets louder and then it srikes you get killed by the lion you lose the game";
}if(t=n){
;cout << "The sound gets quiter but now you are lost enter (c) to stop and shout for help enter (r) to carry on running";
}
return 0;
}
output:
main.cpp: In function ‘int main()’:
main.cpp:14:10: error: ‘y’ was not declared in this scope
if(t=y){
^
main.cpp:16:11: error: ‘n’ was not declared in this scope
}if(t=n){
^