//--- 例程 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;
}
|