I am trying to compare two arrays by making an overloaded operator ==
.
My code looks something like this:
//myArray.h
class myArray {
int size, start, end;
int *data;
public:
myArray(int sz);
myArray(int lower, int upper);
int &operator [](const int index);
bool operator == (const myArray& index);
};
//myArray.cpp
bool operator == (const myArray& index);
{
}
but there is an error in my cpp file where it says:
too few parameters for this operator function, Function definition for 'operator==' not found.
Any advice/solutions to this error would be much appreciated!