//--- 例程 CList::IndexOf(CObject*)
#include <Arrays\List.mqh>
//---
void OnStart()
{
CList *list=new CList;
//---
if(list==NULL)
{
printf("对象创建错误");
return;
}
CObject *object=new CObject;
if(object==NULL)
{
printf("元素创建错误");
delete list;
return;
}
if(list.Add(object))
{
int pos=list.IndexOf(object);
}
//--- 删除列表
delete list;
}
|