I think there’s some confusion here about what operator means, which is totally understandable if you’re not used to that terminology. operator isn’t the name of a function, it’s a term used to describe the type of construct that > is, which is basically a function that behaves differently semantically than regular functions (https://en.wikipedia.org/wiki/Operator_(computer_programming)). In other words, describing > as an operator is intended to convey that the syntax to use it is x > y rather than >(x,y), which would be the standard way to call regular functions. Anyway, you can just use @bgoodri’s version of the function, but to get your original version to not error you’d need to replace operator>(x[i],y[i]) with just x[i] > y[i]. Hope that helps clarify.