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
4 months agoHarris
5 months agoParis
5 months agoLeonida
5 months agoRaina
5 months agoNickolas
6 months agoJerrod
6 months agoTamekia
6 months agoMauricio
6 months agoVon
6 months agoTamra
6 months agoCarissa
6 months agoAlica
6 months agoRebbeca
6 months agoNicolette
6 months agoCatarina
11 months agoKendra
11 months agoCrissy
10 months agoAlpha
10 months agoVeta
10 months agoAileen
10 months agoStephaine
12 months agoElly
11 months agoSamuel
11 months agoLili
11 months agoNada
1 year agoLauna
1 year agoCarma
11 months agoCarma
11 months agoYolando
1 year agoMilly
1 year ago