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() { B t1[]={3,2,4,1,5}; B t2[]={6,10,8,7,9}; vector v1(10); sort(t1, t1+5); sort(t2, t2+5); merge(t1,t1+5,t2,t2+5,v1.begin()); for_each(v1.begin(), v1.end(), Out(cout));cout< return 0; } Program outputs:
Huey
8 months agoHarris
9 months agoParis
9 months agoLeonida
9 months agoRaina
9 months agoNickolas
10 months agoJerrod
10 months agoTamekia
10 months agoMauricio
10 months agoVon
10 months agoTamra
10 months agoCarissa
10 months agoAlica
10 months agoRebbeca
10 months agoNicolette
10 months agoCatarina
1 year agoKendra
1 year agoCrissy
1 year agoAlpha
1 year agoVeta
1 year agoAileen
1 year agoStephaine
1 year agoElly
1 year agoSamuel
1 year agoLili
1 year agoNada
1 year agoLauna
1 year agoCarma
1 year agoCarma
1 year agoYolando
1 year agoMilly
1 year ago