The C++ selection statements, if and switch, provide a means to conditionally execute sections of code.
selection-statement:
if (expression)statement
if (expression)statementelsestatement
switch (expression)statement
The statement in the if, else, and switch statements cannot be a declaration.