Files
mql5-skills/skills/mql5/references/docs/34-standardlibrary/1722-standardlibrary-datastructures-carraystring-carraystringaddarray.md
T
2026-06-23 21:47:51 +08:00

53 lines
908 B
Markdown
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# AddArray
Adds elements of one array to the end of another.
```
bool  AddArray(
   const string&  src[]      // source array
   )
```
Parameters
src[]
[in] Reference to an array of source elements to add.
Return Value
true - successful, false - cannot add items.
Example:
```
//--- example for CArrayString::AddArray(const string &[])
#include <Arrays\ArrayString.mqh>
//---
string src[];
//---
void OnStart()
  {
   CArrayString *array=new CArrayString;
   //---
   if(array==NULL)
     {
      printf("Object create error");
      return;
     }
   //--- add another array
   if(!array.AddArray(src))
     {
      printf("Array addition error");
      delete array;
      return;
     }
   //--- use array
   //--- . . .
   //--- delete array
   delete array;
  }
```