why cant we overload [ ] operator instead of the ( ) operator.
Functional operator overloading
@gauravlodhi21 functors are c++ classes that act as functions, and the way to call a function is through () operator. You can try overloading the [] operator too, but that’s not the convention.