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
7 months agoHarris
7 months agoParis
7 months agoLeonida
8 months agoRaina
8 months agoNickolas
8 months agoJerrod
8 months agoTamekia
8 months agoMauricio
9 months agoVon
9 months agoTamra
9 months agoCarissa
9 months agoAlica
9 months agoRebbeca
9 months agoNicolette
9 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