//--- 例程 CObject::Prev() #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_second.Prev(); //--- 删除对象 delete object_first; delete object_second; } |