When input is "string1", the program prints "outcome1" as expected. However, when input is "string3", it also prints "outcome1". When i change the first "if" statement to:
1 2 3 4
if (input == "string1")
{
cout << "outcome1";
}
however, then string3 will give a outcome2 as a result. Does this mean that I need to separate the "if" statements for string1 and string2 or is there a way of grouping them together to improve readability?