Next

获取列表中下一个元素的指针。

CObject*  Next()

返回值

列表中下一个元素的指针。如果此为最后的列表项, 则返回 NULL。

例如:

//--- 例程 CObject::Next()

#include <Object.mqh>

//---

void OnStart()

  {

   CObject *object_first,*object_second;

   //---

   object_first=new CObject;

   if(object_first==NULL)

     {

      printf("对象创建错误");

      return;

     }

   object_second=new CObject;

   if(object_second==NULL)

     {

      printf("对象创建错误");

      delete object_first;

      return;

     }

   //--- 设置关联

   object_first.Next(object_second);

   object_second.Prev(object_first);

   //--- 使用下一个对象

   CObject *object=object_first.Next();

   //--- 删除对象

   delete object_first;

   delete object_second;

  }