Go to the first, previous, next, last section, table of contents.


CNArray2<type> -- 2-dimensional Arrays of other <Type>s

DESCRIPTION

CNCL currently provides 2 dimensional array classes for the data types char, double, float, int, long, and CNObject * with the classes CNArray2Char, CNArray2Double, CNArray2Float, CNArray2Int, CNArray2Long, and CNArray2Object respectively. The description of those classes is similar to CNArray2Char.

All CNCL compatible objects can be stored in a CNArray2Object, thus that there is no need for specialized array types.

Nevertheless it is possible to generate arrays of other data types with the CNarray2 script.

Usage:

CNarray2 name

The required parameter is the name of the data type. CNarray2 generates two files Array2Name.h and Array2Name.c with the definition and implementation of the desired array class.

Please note that name must be a single word, pointers and references are not allowed, either. If you need an array of pointers or e.g. an array of unsigned long, you can use an appropiate typedef:

typedef unsigned long ulong;
typedef Data *DataP;

and then generate an array

CNarray2 ulong
CNarray2 DataP

yielding the classes CNArray2Ulong and CNArray2DataP.


Go to the first, previous, next, last section, table of contents.