Error in Ex10_06
I am unable to compile Ex10_06, the compiler does not recognize the use of greater<double> at the end of the program beginning with:
values.sort(greater<double>());
I copied the code directly out of the book so I didn't mistype and I tried a smaller program using the functional header that has greater and that works. Is anybody else having this problem?
Dave
Update: Okay, mystery solved. The sample code I downloaded did not have the statement
using std::greater;
in the beginning. Could also have simply put "using namespace std;"
Last edited by dpantale; April 13th, 2011 at 10:59 AM..
Reason: Resolved problem
|