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}; set s1(t, t+10); sort(s1.begin(), s1.end()); for_each(s1.begin(), s1.end(), Out(cout));cout< return 0; } Program outputs:
Carma
1 day agoBette
7 days agoTyisha
12 days agoLaurel
17 days agoMichel
22 days agoIsreal
27 days agoLettie
1 month agoDelfina
1 month agoKirby
1 month agoHui
2 months agoReid
2 months agoTiffiny
2 months agoLeonardo
2 months agoSabina
2 months agoLatosha
3 months agoElvera
3 months agoTeri
4 months agoCarma
4 months agoDerick
4 months agoZita
4 months agoEllsworth
2 months agoTommy
3 months agoLezlie
3 months ago