may we use arraycompare fuction to compare two structures ?

 

may we use ArrayCompare() fuction to compare two structures ?

if not ,is there functions to compare strucures ?

thanks .

 
yalewang:

if not ,is there functions to compare strucures ?

// MQL4&5-code

#property strict

#include <TypeToBytes.mqh> // https://www.mql5.com/ru/code/16280

void OnStart( void )
{
  MqlTick Tick;
  ::SymbolInfoTick(::Symbol(), Tick);

  MqlTick CloneTick = Tick;

// Operation with structures
  if (_R(Tick) == CloneTick)             // Now the structures can be compared

    ::Print("Equal");
}
TypeToBytes
TypeToBytes
  • votes: 19
  • 2016.09.19
  • fxsaber
  • www.mql5.com
Byte-wise operation with structures and standard data types.
 
yalewang: if not ,is there functions to compare strucures ?
You write them. See Sort multiple arrays - MQL4 and MetaTrader 4 - MQL4 programming forum
Reason: