is fine as you have closed your 'else' statement.Code:if(myname == "Me") {cout << "Hello ME";} else { if(myname == "You") {cout << "Hello YOU";} }
But in your program you aren't closing them, not until the end, which doesn't work, at least not to my knowledge. It certainly isn't something that is commonly done.
As here
You haven't closed the first 'else' before starting the second.Code:else { if(player.exp < 7000) {getmonster = 7;} else {