if (choice == "ESCAPE" || "escape" || "Escape")
{ cout << "You ran to the door and broke it open with a hatchet you found in the closet." << endl;
}
elseif (choice == "STAY" || "stay" || "Stay"){
cout << "The ocean water broke through the window and you drowned :(\nGAME OVER!" << endl;
}
1 2 3 4 5 6
if (choice == "ESCAPE" || choice == "escape" || choice =="Escape") {
cout << "You ran to the door and broke it open with a hatchet you found in the closet." << endl;
}
elseif (choice == "STAY" || choice == "stay" || choice == "Stay"){
cout << "The ocean water broke through the window and you drowned :(\nGAME OVER!" << endl;
}
You want to be careful when doing things like this.
1 2
if("someText") // it may not make sense, but this always evaluates true
std::cout << "I'm going to be printed!\n";