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:
Carman
4 months agoSharmaine
5 months agoDominque
5 months agoElbert
5 months agoCarin
5 months agoDell
6 months agoJennifer
6 months agoShawnda
6 months agoPaulina
6 months agoDusti
6 months agoMy
6 months agoHester
6 months agoWinfred
6 months agoBambi
6 months agoLeonor
6 months agoAlbina
11 months agoBeth
11 months agoOcie
11 months agoDylan
10 months agoNickolas
10 months agoMicaela
10 months agoLashanda
10 months agoAndra
11 months agoIndia
9 months agoIndia
10 months agoIndia
10 months agoGabriele
11 months agoRodrigo
11 months agoAlva
11 months agoCandra
11 months agoTanja
12 months agoDottie
10 months agoDottie
11 months agoGalen
1 year agoQuentin
1 year agoValene
1 year ago