Hi.. I am new to C++,I want to create a Priority Queue class, I don't know How to use the comparison operator( operator < method ) in my class and why we are using that?
for example if I defined (operator <) method booloperator <(MyClass &A,MyClass &B){return (A.getValue()<B.getValue)}
so now how can I use the "<" in my class? I am really confused with this (operator <) because it's just return the true or false.