Hey folks, I have a problem regarding using std::list::sort. I wrote my own comparator function below, and called sort with said function as the input parameter. I don't understand why the compiler cannot find the function when it seems to me that nothing's wrong. Help would be appreciated. Thanks.
Heh, I guess putting this in the beginners subforum was the right place after all. I took a look at the documentation for functors(never used them before, haven't been taught anything about them yet) online but I'm not quite sure how to use them in this case. Could you kindly provide an example?