What happens when you attempt to compile and run the following code?
#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 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[]={8, 10, 5, 1, 4, 6, 2, 7, 9, 3}; deque d1(t, t+10); sort(d1.begin(), d1.end()); deque::iterator it = upper_bound(d1.begin(), d1.end(), B(4), greater()); for_each(it, d1.end(), Out(cout)); cout< return 0; } Program outputs:
Leatha
8 months agoAhmed
8 months agoBettyann
8 months agoBrittni
8 months agoLynsey
8 months agoAleisha
9 months agoLatanya
10 months agoCyril
10 months agoKizzy
10 months agoKenny
10 months agoMaryrose
10 months agoHildred
11 months agoCarissa
11 months agoEttie
11 months agoGeorgene
11 months agoFlo
11 months agoGraciela
9 months agoMelita
9 months agoVesta
9 months agoAshanti
9 months agoDominic
1 year agoNieves
1 year agoReena
11 months agoTracey
11 months agoIvory
1 year agoAhmed
1 year agoAmalia
1 year ago