What happens when you attempt to compile and run the following code?
#include
#include
#include
using namespace std;
template
ostream & out;
Out(ostream & o): out(o){}
void operator() (const T & val ) { out< int main() { int t1[]={3,2,4,1,5}; int t2[]={6,10,8,7,9}; vector sort(t1, t1+5); sort(t2, t2+5); merge(t1,t1+5,t2,t2+5,v1.begin()); for_each(v1.begin(), v1.end(), Out return 0; } Program outputs:
Albina
1 months agoBeth
1 months agoOcie
1 months agoNickolas
8 days agoMicaela
16 days agoLashanda
19 days agoAndra
1 months agoIndia
3 days agoGabriele
2 months agoRodrigo
1 months agoAlva
1 months agoCandra
1 months agoTanja
2 months agoDottie
12 days agoDottie
1 months agoGalen
2 months agoQuentin
2 months agoValene
2 months ago