In STRING STL lecture 2 of 2-D Array

we don’t have to call bool compare function in the main and how can it execute automatically without calling ???

@sharmalakshyarocks It will be called from the inbuilt sort function you will be using.We write our own comparator function and pass it as a third parameter. This “comparator” function returns a value; convertible to bool, which basically tells us whether the passed “first” argument should be placed before the passed “second” argument or not.