class PersonCompare{
public:
bool operator(){Person A,Person B){
return A.age<B.age;
}
};
whats the role of bool operator().
class PersonCompare{
public:
bool operator(){Person A,Person B){
return A.age<B.age;
}
};
whats the role of bool operator().
@Abhi_jeet007 its way of making function comparator in heap stl. it sorts the heap in increasing order of age of person. its the syntax.
hope its clear if yes dont forget to mark the doubt resolved and hit like