Delete
Delete
Removes the element from the specified array position.
bool Delete(
int pos // position
)Parameters
- pos
[in] Position of the array element to be removed.
Return Value
true - successful, false - cannot remove the element.
Example:
//--- example for CArrayDouble::Delete(int)
#include <Arrays\ArrayDouble.mqh>
//---
void OnStart()
{
CArrayDouble *array=new CArrayDouble;
//---
if(array==NULL)
{
printf("Object create error");
return;
}
//--- add arrays elements
//--- . . .
//--- delete element
if(!array.Delete(0))
{
printf("Delete error");
delete array;
return;
}
//--- delete array
delete array;
}Last updated on