Zoo tutorials: [ SQL | Linux | XML ]
ProgZoo: [ Java | C# | VB | C++ | Perl ]
Log in

A Gentle Introduction to
C++ Programming

The switch .. case ... statement

 

Control Structures

The switch .. case ... statement

The switch statement can deal with specific values for the control variable. Typically we can use integers or enumerated types.

See also: Boxes tutorial
See also: if .. else ..
See also: if .. else .. if ..

1. [ C++ ] switch .. case


Big

We calculate the population density in people per 100km2.