Character overloading is also a function, and a function such as const at the end of a function is called a constant member function. The constant member function can be understood as a "read-only" function, which cannot change the value of a data member or invoke a member function that can cause a change in the value of a data member, only the const member function.
The first guarantees that an explicit call is not modified, and the second guarantees that the implicit call is not modified.
The const is put in the last member function called the constant function, which is used to prevent the member data of this class from being modified in this function. If modified, a compilation error occurs. This overload cannot change the variable you are referencing (array&).
Such as:
BOOL operator== (const array&) const; What is this last const for?