if what you compare in those if-statements are integertype values you can use switch and case instead. Example of this:
What is meant with fall through:
// do something
break; // This is needed otherwise it will "fall through", explenation below.
// do something else
Consider this code:
If you in this piece of code input 1 output will be:
std::cin >> a;
std::cout << "a = 1" << std::endl;
std::cout << "a = 2" << std::endl;
// notice: no break statement here.
std::cout << "a = 0" << std::endl;
std::cout << "Default action taken." << std::endl;
a = 1
If you input 2 ouput will be:
a = 2
a = 0
If you input something else output will be:
Default action taken.
Basicly the program will just start at the first case that matches and then it will go through all the other cases (even if they arent correct) and do what is in those until it hits a break or until no more cases are given.