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}; vector v1(t, t+10); sort(v1.begin(), v1.end(), greater()); for_each(v1.begin(), v1.end(), Out(cout));cout< return 0; } Program outputs:
Giuseppe
2 days agoWilda
7 days agoBok
12 days agoEarleen
17 days agoBarrett
22 days agoLucina
28 days agoWei
1 month agoEliz
1 month agoLezlie
1 month agoRoselle
2 months agoHelaine
2 months agoWilda
2 months agoKallie
2 months agoBerry
2 months agoCarlota
2 months agoShad
3 months agoAmber
3 months agoShonda
3 months agoLeonor
3 months agoShaunna
3 months agoVivienne
5 months ago