GetNodeAtIndex
Obtém um item com o índice determinado da lista.
CObject* GetNodeAtIndex(
int pos
)
|
Parâmetros
pos
[in] índice do item na lista.
Valor de retorno
Exemplo
//--- example for CList::GetNodeAtIndex(int)
#include <Arrays\List.mqh>
//---
void OnStart()
{
CList *list=new CList;
//---
if(list==NULL)
{
printf("Object create error");
return;
}
//--- add list elements
//--- . . .
CObject *object=list.GetNodeAtIndex(10);
if(object==NULL)
{
printf("Get node error");
delete list;
return;
}
//--- use element
//--- . . .
//--- do not delete element
//--- delete list
delete list;
}
|