Prev
Prev
将指针设置到前一个列表项。
void Prev(
CObject* object // 指针到前一个列表项
)参数
- object
[输入] 前一个列表项的新指针值。
例如:
//--- 例程 CObject::Prev(CObject*)
#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);
//--- 使用对象
//--- ...
//--- 删除对象
delete object_first;
delete object_second;
}