Resize
Sets a new (smaller) size of the array.
Parameters
size
[in] New size of the array.
Return Value
Note
Example:
//--- example for CArrayLong::Resize(int)
#include <Arrays\ArrayLong.mqh>
//---
void OnStart()
{
CArrayLong *array=new CArrayLong;
//---
if(array==NULL)
{
printf("Object create error");
return;
}
//--- add arrays elements
//--- . . .
//--- resize array
if(!array.Resize(10))
{
printf("Resize error");
delete array;
return;
}
//--- delete array
delete array;
} |