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

46 lines
802 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.
# CompareArray
Compares the array with another one.
```
bool  CompareArray(
   const string&  src[]      // source array
   ) const
```
Parameters
src[]
[in] Reference to an array used as a source of elements for comparison.
Return Value
true - arrays are equal, false - arrays are not equal.
Example:
```
//--- example for CArrayString::CompareArray(const string &[])
#include <Arrays\ArrayString.mqh>
//---
string src[];
//---
void OnStart()
  {
   CArrayString *array=new CArrayString;
   //---
   if(array==NULL)
     {
      printf("Object create error");
      return;
     }
   //--- compare with another array
   int result=array.CompareArray(src);
   //--- delete array
   delete array;
  }
```