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