You need to check each case individually using the OR operator if you want to check more than one case.
if (BothMods == "Yes" || BothMods == "YES" || BothMods == "yes") {
// do whatever
}
More Related Contents:
- std::cin input with spaces?
- if (cin >> x) – Why can you use that condition?
- How to read cin with whitespace up until a newline character?
- Press Enter to Continue
- cin.getline() is skipping an input in C++ [duplicate]
- Pointer to string with spaces [closed]
- Case-insensitive string comparison in C++ [closed]
- C++ performance challenge: integer to std::string conversion
- std::string to char*
- How do I create a random alpha-numeric string in C++?
- How to convert string to char array in C++?
- What makes more sense – char* string or char *string? [duplicate]
- C/C++: Optimization of pointers to string constants
- How to cin values into a vector
- Why does C++ allow an integer to be assigned to a string?
- Proper way to copy C strings
- Why are strings in C++ usually terminated with ‘\0’?
- Conversion from string literal to char* is deprecated
- String to enum in C++
- writing directly to std::string internal buffers
- Why does this if condition fail for comparison of negative and positive integers [duplicate]
- std::getline on std::cin
- How to (un)escape strings in C/C++?
- Converting an int to std::string
- Do I have to use #include beside ?
- comma operator in if condition
- How can CString be passed to format string %s?
- Do I need to put constexpr after else-if?
- How can a char pointer be initialized with a string (Array of characters) but an int pointer not with an array of integer? [duplicate]
- Forcing String to int Function to Consume Entire String