No match for operator [ ] c++ : I'm not entirely sure why I'm getting this message, given that square brackets aren't an operator, but here we go.

In my `IntSet.h` file, I have declared a particular function that looks like this.

`IntSet unions(const IntSet& operand)const;`

The file is called by an `IntSet`, takes another `IntSet` as an argument, and returns the union of the two sets.

In my `IntSet.cpp` file, it looks like this.

    IntSet IntSet::unions(const IntSet& operand) const
    {
    IntSet returnSet(50);
    for (int i = 0; i < 50; i++){
        if (setArray[i] == 1 || operand[i]==1){
            if(setArray[i] == 1 ){
            returnSet.addElement(setArray[i]);
            }
            else if(operand[i] == 1){
                returnSet.addElement(operand[i]);
            }
        }
    }

    return returnSet;
    }


The error I'm getting comes from the the `operand[I] == 1`.

`IntSet.cpp|52|error: no match for 'operator[]' (operand types are 'const IntSet' and 'int')`.

I looked into overloading operators, but the square brackets don't seem to be overloadable. Regardless, the program must not override and operators to start. I Should also mention that `IntSet unions(const IntSet& operand)const;` was provided and can also not be changed.

Any direction as to how I should solve this? 


