I would like to know is it possible to sort number by even or odd using the std::sort function.
I have the following codes but i am not sure how to implement in the
You can write a comparison function like
bool evenOddLess( Point const& a, Point const& b ) { return (isEven( a ) < isEven( b )); }
Then you can use that as third argument to std::sort.
std::sort