//--- esempio per CObject::Next()
#include <Object.mqh>
//---
void OnStart()
{
CObject *object_first,*object_second;
//---
object_first=new CObject;
if(object_first==NULL)
{
printf("Errore creazione oggetto");
return;
}
object_second=new CObject;
if(object_second==NULL)
{
printf("Errore creazione oggetto");
delete object_first;
return;
}
//--- imposta interconnessione
object_first.Next(object_second);
object_second.Prev(object_first);
//--- usa l'oggetto next
CObject *object=object_first.Next();
//--- elimina oggetti
delete object_first;
delete object_second;
}
|