//--- CArrayInt::InsertArray(const CArrayInt*,int) の例
#include <Arrays\ArrayInt.mqh>
//---
void OnStart()
{
CArrayInt *array=new CArrayInt;
//---
if(array==NULL)
{
printf("Object create error");
return;
}
//--- ソース配列を作成する
CArrayInt *src=new CArrayInt;
if(src==NULL)
{
printf("Object create error");
delete array;
return;
}
//--- ソース配列に要素を加える
//--- . にて。.
//--- 別の配列を挿入する
if(!array.InsertArray(src,0))
{
printf("Array inserting error");
delete src;
delete array;
return;
}
//--- ソース配列を削除する
delete src;
//--- 配列を使用する
//--- . にて。.
//--- 配列を削除する
delete array;
}
|