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()); for_each(v1.begin(), v1.end(), Out(cout));cout< return 0; } Program outputs:
Franchesca
6 months agoMan
6 months agoGeorgiann
7 months agoGlendora
7 months agoTuyet
7 months agoCoral
7 months agoChauncey
7 months agoBernardo
7 months agoLuisa
7 months agoJoye
7 months agoTracey
7 months agoLeslie
7 months agoErinn
7 months agoSelma
1 year agoLeonard
1 year agoRicarda
11 months agoTanesha
11 months agoGregg
12 months agoGregg
12 months agoGregg
12 months agoQueen
1 year agoJolanda
1 year agoNickolas
11 months agoRosendo
11 months agoNilsa
11 months agoKasandra
11 months agoAshlyn
1 year agoSylvie
1 year agoGretchen
1 year agoAaron
1 year agoKami
1 year agoYen
1 year ago