Hi, the following is my code, i have two questions:
first, in line 7, why can't i make ba1 and ba2 to be reference?
second, there are some standard comparison functors for sort algorithm, what is the difference between greater<T>() and greater_equal<T>(), and less<T>() and less_equal<T>()?
2. greater<T>() sorts in descending order, less<T>() sorts in ascending order and is used by default. less_equal<T>() and greater_equal<T>() are not for use with sort()
Incidentally, #including a cpp file is very strange
I have tried your code, but i get the following compilation error: sort_ba.cpp:8:27: error: passing ‘const bankAcct’ as ‘this’ argument of ‘double bankAcct::getBalance()’ discards qualifiers
Why?