Creating a vector
Creating a vector involves the following steps:
Type nameVector; or
as in the examples below:
nameVector = new Type[nrElements];
where nrElements represents the maximum number of characters the Vector can have. Following the instantiation, you will be allocated nrElements * dimension(Type) to memorize the elements in Vector, where Type has the number of bytes represented by that type.
v = new int;
//allocate spaces for 10 integers: 40 bytes
c = new char;
//allocate space for 10 characters: 20 bytes
The declaration and instantiation of a Vector can be done as follows:
Type nameVector = new Type[nrElements];
This page is under construction !