Add
Adds an element to the end of the array.
bool Add(
string element
)
|
Parameters
element
[in] Value of the element to add to the array.
Return Value
Example:
//--- example for CArrayString::Add(string)
#include <Arrays\ArrayString.mqh>
//---
void OnStart()
{
CArrayString *array=new CArrayString;
//---
if(array==NULL)
{
printf("Object create error");
return;
}
//--- add arrays elements
for(int i=0;i<100;i++)
{
if(!array.Add(IntegerToString(i)))
{
printf("Element addition error");
delete array;
return;
}
}
//--- use array
//--- . . .
//--- delete array
delete array;
}
|