Dynamic arrays

Top  Previous  Next

What is translated > Types > Arrays > Dynamic arrays

 

Dynamic arrays are simulated in the C++Builder C++ by the class DynamicArray:

 

template <class T> class DELPHIRETURN DynamicArray;

 

If the output is generated for other compilers std::vector is used instead of a DynamicArray.

 

MyFlexibleArray: array of Real;

->

DynamicArray < double > MyFlexibleArray;  // C++Builder

std::vector < double > MyFlexibleArray;   // other compiler 

 

 

This DynamicArray class has the properties Low, High and Length. By the Length property, the size of the array can be changed. Dynamic arrays are accepted as parameters only, if the type of the array is defined explicitly and if the function expects this type.

 

 

 



This page belongs to the DelphiXE2Cpp11 Documentation

DelphiXE2Cpp11 home  Content