0 Views
0 Downloads
0 Favorites
BasicList
ÿþ/**/

#include <SRC\Service\BasicList.mqh> //your path

/****************************************************************

Example of BasicList usage

/****************************************************************/

void OnStart()

  {

   BasicList<string>list;

   /**/

   list+="worry";                //append

   list+="be happy";             //append

   list.Print();                 //see output

   /**/

     {string s; for(int i=0; i<10; i++) {s+="-";} Print(s);}

   /**/

   list^="don't";                //remove

   BasicList<string>list2=list;  //copy list

   list2.Print();                //see output

   /**/

     {string s; for(int i=0; i<10; i++) {s+="-";} Print(s);}

   /**/

   ~list;                        //clean list

   Print(list2.Pop());           //pop

   /**/

     {string s; for(int i=0; i<10; i++) {s+="-";} Print(s);}

   /**/

   list2.Print();                //see output

  }

/****************************************************************

Output:

/**

   0:worry

   1:be happy

   ----------

   0:don't

   1:worry

   2:be happy

   ----------

   be happy

   ----------

   0:don't

   1:worry

/**/

Comments