What happens when you attempt to compile and run the following code?
#include
#include
#include
#include
using namespace std;
class B { int val;
public:
B(int v):val(v){}
int getV() const {return val;} bool operator > (const B & v) const { return val>v.val;} };
ostream & operator <<(ostream & out, const B & v) { out< template ostream & out; Out(ostream & o): out(o){} void operator() (const T & val ) { out< int main() { int t[]={20, 30, 10, 20, 30, 10, 20, 30, 10, 20}; deque d1(t, t+10); sort(d1.begin(), d1.end(), greater()); pair greater()); for_each(result.first, result.second, Out(cout));cout< return 0; } Program outputs:
Krissy
9 months agoGayla
9 months agoAlverta
9 months agoJerilyn
10 months agoCarylon
10 months agoDan
10 months agoCurt
10 months agoJoseph
10 months agoTricia
10 months agoJosephine
10 months agoMerlyn
10 months agoBette
10 months agoBasilia
10 months ago