previous | start | next

## Using Vectors to Collect Data Items (Syntax 9.1 Vector Variable Definition)

Syntax 9.1 : Vector Variable Definition
    vector<type_name> variable_name;vector<type_name> variable_name(initial_size);
Example: |
    vector<int> scores;
    vector<Employee> staff(20);
Purpose: | Define a new variable of vector type, and optionally supply an initial size.

previous | start | next