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
3 months agoBeth
3 months agoOcie
3 months agoDylan
2 months agoNickolas
2 months agoMicaela
2 months agoLashanda
2 months agoAndra
3 months agoIndia
2 months agoIndia
2 months agoIndia
2 months agoGabriele
4 months agoRodrigo
3 months agoAlva
3 months agoCandra
3 months agoTanja
4 months agoDottie
2 months agoDottie
3 months agoGalen
4 months agoQuentin
4 months agoValene
4 months ago