#include <codecogs/array/vector.h>
using namespace Array;
| template<class T>T* | vector (long Columns)[inline] Dynamically allocates a 1D block (vector) of data. | |
| template<class T>T* | vector (long Columns_start, long Columns_end)[inline] Dynamically allocates a 1D block (vector) of data using an offset base memory address. | |
| template<class T>void | free_vector (T* Vector, int offset=0)[inline] Frees from memory a 1D block of dynamically allocated data. |
| template<class T>T*vector( | long | Columns | )[inline] |

Ordering of data
char* a=vector<char>(11);is nearly (see code) identical to:
char* a=new char[11];You may use free_vector with default argment to deallocate memory allocated to this structure, alternatively you can use the more traditional C++ approach: delete[](..)
| Columns | The length of the vector. |
| template<class T>T*vector( | long | Columns_start | |
| long | Columns_end | )[inline] |

Ordering of data
#include <codecogs/array/vector.h> int main() { double *a = Array::vector<double>(1,10); a[1]=23.4; a[10]=56.7; Array::free_vector(a, 1); int *b = Array::vector<int>(20,30); b[20]=4; b[30]=5; Array::free_vector(b, 20); return 0; }
| Columns_start | The first addressible index. |
| Columns_end | The last addressible index. |
| template<class T>voidfree_vector( | T* | Vector | |
| int | offset = 0 | )[inline] |
delete is most situations.
The opposite of this function is vector | Vector | is the 1D data structure to delete. |
| offset | is the original offset to the first element in the array, if not zero (default=0). |